Search code examples
c#xamarinnugetxamarin.formsoxyplot

How to Install OxyPlot NuGet Package?


Good Day. I'm trying to Install an OxyPlot NuGet Package here in my Visual Studio 2015. However, I'm not successful in doing so. I'll use it in creating a Pie Chart in my Xamarin.Forms Portable Application.

First I've installed OxyPlot.Core v1.0.0-unstable2100 , then OxyPlot v1.0.0-unstable2100 , but when I tried to install the last one I need which is OxyPlot.Xamarin.Forms, it prompt an error saying

Unable to find a version of 'OxyPlot.Core' that is compatible with 'OxyPlot.WindowsForms 1.0.0-unstable2100 constraint: OxyPlot.Core (= 1.0.0-unstable2100)', 'OxyPlot.Wpf 1.0.0-unstable2100 constraint: OxyPlot.Core (= 1.0.0-unstable2100)', 'OxyPlot.Xamarin.Forms 1.0.0-unstable1983 constraint: OxyPlot.Core (= 1.0.0-unstable1983)'.

What do you think is the reason behind this?

Is there an order to follow in Installing OxyPlot Packages? Which package do I need to install first?

Thanks for your help.


Solution

  • There's no need to install anything in a certain order when it comes to NuGet. Any kind of dependencies that are needed will get downloaded automatically. In other words, when you add the OxyPlot.Xamarin.Forms-package to your project, the correction version of OxyPlot.Core will be added as well.

    The OxyPlot.Xamarin.Forms-package can be found on the official nuget.org NuGet feed as well, but since it's a prerelease , make sure you have selected the Include Prerelease selection in the Manage NuGet Packages window of Visual Studio.

    I've just tested it and it seems to work. Good luck!