Search code examples
c#wpfreferenceoxyplot

Oxyplot adding reference


I tried to follow the following link to start learning OxyPlot I added reference using "Manage NuGet Packages...". However,

 using OxyPlot;

is still underlined (the type or namespace 'OxyPlot' could not be found...)

I tried Package Manager Console to add reference as suggested:

PM> Install-Package OxyPlot.Wpf

But got back

Attempting to resolve dependency 'OxyPlot.Core (= 2014.1.546)'.
OxyPlot.Wpf 2014.1.546' already installed.
OxyPlotTesting already has a reference to 'OxyPlot.Wpf 2014.1.546'.

Any ideas?


Solution

  • I think this may be your issue:

    1. When you added OxyPlot through NuGet, you need both "OxyPlot for WPF" and "OxyPlot core library", since the WPF extension is dependent on the Core, and just adds the WPF integration. You probably only added "OxyPlot for WPF", which is why you couldn't find the oxyplot namespace.
    2. Your "already installed" error is probable saying "You have already added this in NuGet, and now you are trying to install it again through command line".

    Hope this helps!