Search code examples
xamarin.formsvisual-studio-mac

Nuget Packages missing for IOS in Xamarin Forms Solution in Visual Studio for Mac


For some reason that I haven't been able to figure out my packages seem to be missing. If I click 'Restore Packages' everything works fine.

If I add 1 more, it shows that thats the only package I have. I just don't have the option to update packages through the Package Manager.

Here is what I have:

enter image description here

I have researched havent found anything. My droid project works fine. I have compared both .csproj and they seem very similar. Here is the section where the packages are:

  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core" />
    <Reference Include="Xamarin.iOS" />
    <Reference Include="Plugin.MediaManager.Abstractions">
      <HintPath>..\packages\Plugin.MediaManager.0.4.5\lib\Xamarin.iOS10\Plugin.MediaManager.Abstractions.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.MediaManager">
      <HintPath>..\packages\Plugin.MediaManager.0.4.5\lib\Xamarin.iOS10\Plugin.MediaManager.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Settings.Abstractions">
      <HintPath>..\packages\Xam.Plugins.Settings.3.1.1\lib\Xamarin.iOS10\Plugin.Settings.Abstractions.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Settings">
      <HintPath>..\packages\Xam.Plugins.Settings.3.1.1\lib\Xamarin.iOS10\Plugin.Settings.dll</HintPath>
    </Reference>

Does anyone has a clue on how to fix this?

Thanks


Solution

  • Thanks for all the comments. I have found the problem.

    A few weeks ago, I got some errors while building the solution and one of the recommended solution was to add this to the .csproj:

    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>

    That turn out to be the culprit of the problem. I removed that line and everything started to work again.