Namespace prefix "oxy" not defined

Sep 25, 2013 at 11:42 AM
Hi there,

This might be a very basic question, but after installing OxyPlot.WPF (and OxyPlot.Core) in NuGet in a new VS 2012 project I can't see any oxyplot controls in the Toolbox. Neither can I add any XAML like in the WPF Example:
<oxy:Plot Model="{Binding MyPlotModel}"/>
Here the compiler complains about the namespace prefix "oxy" not being defined. Have I missed out something?

I would guess I would have to add a line similar to this in the Windows tag?
However, when I do that, I get the error:
FileNotFoundException: Could not load file or assembly 'System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.

The C# codebehind works fine.

Sep 25, 2013 at 1:29 PM
Have you tried to add a reference to System.Core?
Sep 26, 2013 at 8:34 AM
loic_lopes wrote:
Have you tried to add a reference to System.Core?
Hi there,
A reference to System.Core is already there. I tried to search for a System.Core.dll with version 2 but could not find it on my computer. I found 3.5 but I am not sure whether I should delete the existing reference and add this one.

By the way I am targeting .NET Framework 4.5 in my project, and I'm using Visual Studio 2012 Express for Windows Desktop.
Sep 26, 2013 at 9:00 AM
The core library is a Portable Class Library (PCL).
Is your VS 2012 Express up to date? Update 3 is needed for other versions of Visual Studio 2012.
Sep 26, 2013 at 9:19 AM
Edited Sep 26, 2013 at 9:20 AM
Yes, it's got update 3. Full version number is 11.0.60610.01. Update 3.
I have VS 2010 also running on my computer. I might try to compile it there as well.
Sep 26, 2013 at 9:38 AM
Ok it's building and running without any errors in VS 2010 Professional. Although I have to check my code a bit as nothing is appearing in the Window when it is running. ;) Can't notice any OxyPlot specific controls in the Toolbox, but I'm not sure if there is supposed to be anything there?

VS 2012 Express still gets the error above.
Sep 26, 2013 at 9:51 AM
For some reason it is actually running now in VS 2012 Express! I used NuGet to update both the OxyPlot core and OxyPlot.Wpf to the most recent versions: 2013.1.88.1 (OxyPlot core was 2013.1.84.1). Don't know if it was that that fixed it. The XAML designer still gives the the same error message though, but at least it's running. Will modify the code to try to create a plot and see how it goes...