What should I do about unstable packages in Visual

2019-09-21 18:23发布

问题:

I'm using Visual Studio to make an app. It works on Android and I'm trying to get it to work on iOS, but I need to resolve this unstable package in my dependencies. Any advice about what I should do?

Error Message:

Package 'OxyPlot.Xamarin.Forms 1.1.0-unstable0011' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework'.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

回答1:

That's a warning message, not an error message, and this is by design.

Please refer to https://docs.microsoft.com/en-us/nuget/reference/target-frameworks for target framework information.

.NET Standard 2.0 and .NET 4.6.1 have a huge surface area overlap. For this Visual Studio and NuGet have added the concept of a fallback framework, where when a user tries to install a .NET Standard package in a .NET Framework project, it will allow the installation but warn the user that it's not 100% compatible and that there may be certain cases in which this does not work.

Related https://github.com/NuGet/Home/issues/5192 https://github.com/NuGet/Home/wiki/Enable-.NET-Core-2.0-projects-to-work-with-.NET-Framework-4.6.1-compatible-packages