-3

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?

Here is the issue the I have.

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.

Community
  • 1
  • 1
AidanR
  • 3
  • 3
  • What is the actual package that's unstable? – Ryan Lundy Jul 12 '18 at 13:48
  • And what do you mean by "unstable"? – mason Jul 12 '18 at 13:49
  • If you click on the link above I posted a picture of my issue. – AidanR Jul 12 '18 at 13:53
  • If I click on the link above I get a message saying imgur is blocked on work computers. Post the actual error message. – Sean Reid Jul 12 '18 at 13:53
  • If I click an imgur link, it gets logged by corporate. Please include the *text* of the error in the question. Bonus: your error message can be indexed by search engines, making your question more useful to others! –  Jul 12 '18 at 13:55
  • I'm removing the C# tag, as this affects any language in VS capable of using Nuget packages, and the answer also does not depend on the language. I added the Nuget tag instead. –  Jul 12 '18 at 13:56
  • I posted the error message that I have. Hope that helps. – AidanR Jul 12 '18 at 13:59
  • You've said "unstable" multiple times, but it appears you just made that up. There's nothing here indicating anything is unstable. – mason Jul 12 '18 at 14:19
  • The error says 'OxyPlot.Xamarin.Forms 1.1.0-unstable001' which led me to think it was unstable. – AidanR Jul 12 '18 at 14:22
  • `1.1.0-unstable001` is a [Semantic Versioning](https://semver.org/#spec-item-9) standard way of indicating a pre-release version that is not considered production-ready by the developers / project managers. That's all. It doesn't actually have anything to do with your issue: the package isn't available for your target framework. Go to the Nuget settings for your project and uncheck "Include prereleases" if you want to only use production-ready packages. I don't think that will fix your problem though. –  Jul 12 '18 at 14:59

1 Answers1

0

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

Please refer to https://learn.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

imps
  • 1,423
  • 16
  • 22