Search code examples
c#xamarinvisual-studio-2017mvvmcrossnuget-package

Unable to upgrade MvvmCross to 6.2.0


I have an old cross platform mobile app project which has been developed (and maintained) using Xamarin on Visual Studio 2017. The iOS app has now run into problems following iOS 11 (mainly camera issues - I have already added the new Entitlement - NSPhotoLibraryUsageDescription - to Info.plist, so this is not the issue). Now, When I ask NuGet, on the portable project, to upgrade the MvvmCross dependency from 5.7.0 to 6.2.0, I get this error:

Could not install package 'MvvmCross 6.2.0'. You are trying to install this package into a project that targets .NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Update

Figured out where to change .NET Framework to 4.6, but whenever I try, it reverts automatically to 4.5 when I click OK.

enter image description here


Solution

  • For anyone else who really isn't a .NET nor app developer, I just want to leave the solution to the problem here.

    After much reading of articles, I found, that the solution was, as SushiHangover also pointed out, to migrate the Core project from PCL to Standard.

    This article goes some way to describing what, when, where, and how-ish: https://learn.microsoft.com/da-dk/dotnet/standard/net-standard#comparison-to-portable-class-libraries

    Thanks for your help!