VS 2012 SimpleDemo: Plot won't render in WPF XAML Designer at Design Time

Feb 3, 2013 at 7:23 PM
Edited Feb 3, 2013 at 8:02 PM
First, fantastic work.
Second, WPF is not my strong suit.
Third, here's the issue:

I tried to replicate the SimpleDemo in a new VS2012 WPF app project and when adding the line to the XAML:

<oxy:Plot Model="{Binding Model}" />

The XAML designer errors and if I close / reopen the XAML the designer crashes with the error below. The project compiles and when I run it it works fine. Your example works in the designer fine. I created another project within your source set of projects and the XAML designer crashes in that project too, then I noticed that in your SimpleDemo's csproj file the references to OxyPlot and OxyPlot.WPF are project level references, not just the DLLs.
<ProjectReference Include="..\..\..\OxyPlot.Wpf\OxyPlot.Wpf.csproj">
      <Project>{698CCD8E-ADCC-4565-8517-5EDD36F07155}</Project>
      <Name>OxyPlot.Wpf</Name>
    </ProjectReference>
    <ProjectReference Include="..\..\..\OxyPlot\OxyPlot.csproj">
      <Project>{87F519B8-5A2F-48C6-AD53-C5F13A82EA6B}</Project>
      <Name>OxyPlot</Name>
    </ProjectReference>
When I copied the contents of the SimpleDemo.csproj to the project I created within your source projects solution, then the designer did not crash.

EDIT: I am using the standard .NET 4.5 libraries, as is your example project. I see OxyPlot uses the .NET Portable Subset, if that makes any difference.

I'm thinking I'm not doing something right as others have not mentioned this. Comments from anyone with clues to my error are welcome. Here's the error. Not finding System.Core is a false flag, I think, and that the error is associated with the line I bolded, I'm pretty sure...

Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteException
Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.

at OxyPlot.PlotModel.Update(Boolean updateData)
at OxyPlot.Wpf.Plot.UpdateModel(Boolean updateData) in c:\Source Code\3rdParty\OyxPlot\oxyplot_f91998730020\Source\OxyPlot.Wpf\Plot.cs:line 1485
at OxyPlot.Wpf.Plot.UpdateModelAndVisuals(Boolean updateData) in c:\Source Code\3rdParty\OyxPlot\oxyplot_f91998730020\Source\OxyPlot.Wpf\Plot.cs:line 1498
at OxyPlot.Wpf.Plot.ArrangeOverride(Size arrangeBounds) in c:\Source Code\3rdParty\OyxPlot\oxyplot_f91998730020\Source\OxyPlot.Wpf\Plot.cs:line 681
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteUIElement.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteUIElement.CreateContent>b__11()
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessQueue(CallQueue queue)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessInboundAsyncQueue(Int32 identity)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessMessage(Int32 msg, IntPtr wParam, Boolean elevatedQuery, Boolean& handled)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.OnWindowMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at Microsoft.Expression.DesignHost.Isolation.Remoting.MessageOnlyHwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Microsoft.Expression.DesignHost.Isolation.IsolationProcess.RunApplication()
at Microsoft.Expression.DesignHost.Isolation.IsolationProcess.<>c__DisplayClass2.<Main>b__0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Feb 3, 2013 at 9:39 PM
I might add that if I use VS2010 with the .NET 4.0 libraries you just created in the new source set:

... oxyplot_f91998730020\Source\OxyPlot.Wpf\bin\Debug\NET40\

it works fine. If I go back to my VS2012 SimpleDemo project and re-target the VS2012 project to .Net 4.0, and reference the same 4.0 OxyPlot and OxyPlot.WPF libraries the Xaml Designer still crashes. The problem may be with my VS 2012 Pro (?).
Coordinator
Feb 3, 2013 at 9:58 PM
I just corrected a possible null reference error in the WPF plot control. Try the latest version.
I also tested using the WPF designer, drag-dropping a OxyPlot.Wpf.Plot control from the Toolbox works in my VS2012 with .NET 4.5.
Let us know if you find out more!
Feb 3, 2013 at 10:53 PM
Edited Feb 4, 2013 at 12:59 AM
Hello Objo,

Thank you for your very fast response. Unfortunately that did not resolve my issue. I reset my VS 2012 settings, added the OxyPlot.WPF library to my toolbox (I had not tried using the toolbox way) and created a new WPF Application in VS 2012 and dragged the Plot object onto the XAML window in the designer and receive the same error. I will investigate and if I can determine the cause I will post here.

EDIT: I'm thinking that somewhere there's a reference to System.Core version 2.0.5.0 (used maybe for Silverlight?) because the OxyPlot library itself is "multi-targeted" that my VS 2012 will not resolve, while VS 2010 will. (thinking out loud).

Update: I discovered that the Silverlight 5.x System.Core.dll has the same PublicKeyToken=7cec85d7bea7798e so it is a Silverlight System.Core that my VS 2012 does not resolve, so I used gacutil to register that library in the GAC and rebooted but still get the error.

I also tried building a Silverlight app in VS 2012 using OxyPlot.Silverlight and it works OK.
Feb 7, 2013 at 5:45 PM
First of all, Thanks for the excelent work!!

I have the same trouble.
I tried with all versions between 1.12 to 1.28. In all of them I have the mistake in design time.

for instance in binary distribution of 1.28 version.
FileNotFoundException: Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies.

StackTrace
 at OxyPlot.PlotModel.Update(Boolean updateData)
   at OxyPlot.Wpf.Plot.UpdateModel(Boolean updateData) in c:\TeamCity\buildAgent\work\f48330714bade418\Source\OxyPlot.Wpf\Plot.cs:line 1485
   at OxyPlot.Wpf.Plot.UpdateModelAndVisuals(Boolean updateData) in c:\TeamCity\buildAgent\work\f48330714bade418\Source\OxyPlot.Wpf\Plot.cs:line 1498
   at OxyPlot.Wpf.Plot.ArrangeOverride(Size arrangeBounds) in c:\TeamCity\buildAgent\work\f48330714bade418\Source\OxyPlot.Wpf\Plot.cs:line 681
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at OxyPlot.Wpf.Plot.OnApplyTemplate() in c:\TeamCity\buildAgent\work\f48330714bade418\Source\OxyPlot.Wpf\Plot.cs:line 533
   at System.Windows.FrameworkElement.ApplyTemplate()
   at Microsoft.Expression.WpfPlatform.WpfViewNodeManager.EnsureElementInDictionary(Object root, ViewNode knownAncestor)
My workaround was to go back to the version 1.10.

I have: VS2012 PRO.
Coordinator
Feb 7, 2013 at 10:33 PM
Sorry, I don't know what causes this error message in the designer.
I see that the examples included in the OxyPlot solution are ok, it only happens when referencing the assemblies from other solutions.

I tried recreating the OxyPlot core and WPF projects without finding any significant differences, and the references should be correct.
The OxyPlot core library is using TargetFrameworkProfile "Profile2" (.NET 4.0 and higher, SL 4 and higher).

Does anyone else know what is going on here?
Feb 8, 2013 at 2:26 AM
Edited Feb 8, 2013 at 2:27 AM
I can only presume it is a side effect of the multi-targeting and VS 2012. Even though I have Silverlight 3, 4 and 5 on this computer, and with the same PublicKeyToken=7cec85d7bea7798e, somehow VS Studio 2012 does not resolve it properly (VS 2010 does work OK). I am guessing, as only a discovery process for the cause, that if you create a new solution, then create a new OxyPlot library project (add in the files) and a new WPF library project (add in the files), all referencing only .NET 4.5, you will find the reason. It would take some hours to do this, I think but you would have the answer. However I'm not sure you would have the fix because it may not be within your control, but it could be a bug in VS 2012 mishandling multi-targeting resolution under certain conditions.
Coordinator
Feb 10, 2013 at 10:52 PM
Thanks for the idea to recreate the solution files, CMC!

I recreated the OxyPlot.Wpf solution file, created new projects OxyPlot (PCL), OxyPlot.Wpf (.NET 4.5) and a OxyPlot.Wpf_NET40 (.NET 4.0).

The OxyPlot.Wpf.csproj was missing a line:
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
I merged this into the existing projects. If this doesn't help I may need to go the long way and recreate all the solutions.

I also corrected ProjectGuid mismatches in the .sln and .csproj files, I think these should be correct now.
Feb 16, 2013 at 8:22 AM
Edited Feb 16, 2013 at 9:17 AM
I did some simple test by creating an Pcl assembly and an Wpf45 assembly and checked the assembly references with ILSpy.
It seems that OxyPlot.Wpf is referencing the mscorlib two times. The wrong mscorlib is Version=2.0.5.0.
OxyPlot:
// mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
// System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
// System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
// System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
// System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e

OxyPlot.Wpf:
// PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// OxyPlot, Version=2013.1.32.1, Culture=neutral, PublicKeyToken=638079a8f0bd61e9
// System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
// System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Sample45Pcl:
// mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
// System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e

Sample45Wpf:
// PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
UPDATE: Found a hint that this might be an C# compiler bug:
PCL in VS2012 incorrectly resolves mscrolib version in netmodule references

Also this issue (with two mscorlib references) applies to OxyPlot.Silverlight. You have to check all assemblies with ILSpy.

Maybe recreating all projects and references helps, else you would have to remove the invalid reference from the compiled assembly using something like ildasm or Mono.Cecil and resign the assembly afterwards.
Coordinator
Feb 16, 2013 at 12:04 PM
tibel: thanks for helping! I am on 'thin ice' here :)

dotPeek gives me the following information for OxyPlot.Wpf.dll
// References: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// References: mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes
Does the Retargetable=Yes mean something?

I tried adding
    <Reference Include="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <SpecificVersion>True</SpecificVersion>
    </Reference>
to the OxyPlot.Wpf.csproj, but this made no difference. Can a FusionName in the Reference be used, or is this only to optimize loading?

What about the ToolsVersion attribute and the OldToolsVersion element in the .csproj file, should these be set differently?

I am not too concerned if there is a bug in the VS designer as long as the WPF and Silverlight applications seems to work correctly.
If there is a problem with the C# compiler, I prefer to revert back to the old solution where OxyPlot.dll was targetted for each platform. It should still be possible to keep an OxyPlot.Core NuGet package.
Feb 16, 2013 at 6:48 PM
I have created a Microsoft Connect issue: VS2012 incorrectly resolves mscorlib version when referencing PCL assembly

Please vote to get it fixed!!!
Hopefully we also get a workaround for the meantime.
Coordinator
Feb 16, 2013 at 10:13 PM
Great, I have voted up and added a comment!

I found that the use of CultureInfo/IFormatProvider causes problems. Maybe the Culture properties should be changed to string?
Feb 17, 2013 at 6:44 AM
I asked David Kean if he has some ideas for a workaround (see tweet).
He suggested Fody to remove the duplicate mscorlib reference.

Simon Cropp (author of Fody) is also aware of this issue and will create a plugin for Fody (see tweet).
So lets wait a few hours/days before removing all CultureInfo properties from OxyPlot core. Maybe this is not the only cause of the bug?
Coordinator
Feb 17, 2013 at 7:49 AM
Thanks for following this up! I'll await response on the issue before doing any changes to the core library.
Feb 18, 2013 at 5:32 AM
Edited Feb 18, 2013 at 8:13 AM
(David Kean here)

Ignore the duplicate mscorlib above - this is a red herring and normal in this case. The other issue, called out on the Portable Library Tools site on VS Gallery, is something completely different. I wrote a little more around this here: https://github.com/Fody/Fody/issues/43.


It appears that above is a WPF Designer bug around handling portable libraries (that is assuming that OxyPlot itself isn't calling LoadFile, which I downloaded the source and it appears it doesn't). I've raise the issue internally, and trying to get a repro.

For those that are hitting this - can you confirm what version of Visual Studio you are running? VS Update 1? VS Update 2? Can you try VS Update 2 if don't have it installed? We did fix one designer bug around portable, but I'm not sure if affected WPF or not.
Feb 18, 2013 at 4:51 PM
Edited Feb 18, 2013 at 4:55 PM
Microsoft Visual Studio Professional 2012
Version 11.0.51106.01 Update 1
Microsoft .NET Framework Version 4.5.50709
On Win 7 x64
... I check for Windows Updates and no DL for Update 2 is offered.
Feb 18, 2013 at 5:19 PM
Hi David,

I have tested now with VS2012 Update 2 CTP 3 and still get the same error.
Uploaded the sample to my skydrive.
Feb 22, 2013 at 1:00 AM
For what it's worth, it doesn't look like it's limited to VS2012. (Although it could be a bug in how VS2012 creates the dll?, given that you're building with VS2012)

I get the following with VS2010

Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

I back installed to 2013.1.6.1 which builds fine.
Feb 26, 2013 at 7:24 AM
Hi Objo,

I think the bug in Visual Studio Designer will not be fixed in a short time.
Davkean told me that it will not be part of VS 2012 Update 2 (probably).

In the meantime best will be to change Core Library from PCL to platform projects.
Coordinator
Mar 5, 2013 at 11:13 PM
Sorry to hear that this will not be part of the VS update. The change of the core library to PCL simplified the updates of the core project a lot.
I added http://oxyplot.codeplex.com/workitem/10036, I hope I got the description of the problem right.
Personally, I never use the WPF designer, so this is not a high priority issue to me. Will consider reverting if the number of votes gets high!
Mar 6, 2013 at 4:59 AM
We've repro'd the issue and are investigating the cause.

To work around this, I don't think you need to revert back to a platform-specific version of OxyPlot.dll for each platform you support. Rather, you can keep the PCL version, and in addition have a version that is compiled for .NET 4. You would put the .NET 4 version of OxyPlot.dll in the lib\NET40 and lib\NET45 folders of the OxyPlot.Wpf package. The .NET 4 version of OxyPlot.dll should have the exact same identity (name, version, and strong name) as the PCL version.

The effect of this would be that you would still use the PCL OxyPlot core in most cases. Only if you referenced the OxyPlot.Wpf package would you get the one compiled for .NET 4. This would likely fix the issue with the designer. Since both versions of OxyPlot.dll would have the same identity (and APIs), a portable library compiled against the portable version will work if the .NET 4 version is the one that's actually included in the app.

Thanks,
Daniel Plaisted
Microsoft
Coordinator
Mar 13, 2013 at 9:18 PM
Thanks for the tip, Daniel!

I don't like mixing different versions of the core library(even if it will work), so I suggest to add an alternative solution for WPF based on .NET 4 which also includes the pdf and openxml libraries. Let me know if this is not a good solution.

I have submitted the solution OxyPlot.WPF_NET40x.sln, which contains the core library compiled for .NET 4 and the pdf, openxml and wpf libraries depending on this version. The output of the solution is pushed to the NuGet package OxyPlot.Wpf_NoPCL. I hope this is a satisfactory workaround for those who want to use the VS designer in a WPF 4.0 or 4.5 project. And when the VS designer bug is eventually fixed, this solution should be deleted.
Mar 14, 2013 at 11:46 AM
WPF_noPCL is a good solution. Works for me. Thanks a lot!
May 29, 2013 at 2:48 PM
Objo- I found a different work around than what has been posted here so far (although you might be saying the same thing). I got the same error (Could not load file or assembly 'System.Core, Version=2.0.5.0...) using the pre-compiled binaries (OxyPlot-NET40-2013.1.45.1) in VS2010. I managed to get rid of the error by installing .NET 4.5 even though I am targeted for .NET 4.0 in my project. I'm thinking this is related to the compiler bug you guys have been talking about.
Coordinator
Jun 28, 2013 at 10:30 AM
Apply "Visual Studio 2012 Update 3" to solve this issue.
https://www.microsoft.com/en-us/download/details.aspx?id=39305"
Jul 29, 2013 at 12:57 AM
Edited Jul 29, 2013 at 1:42 AM
I still have the problem: I started to use Oxyplot today for the first time, I downloaded the packages from nuget so its up to date, but I can't open the designer, it crashes. I do have update 3 for my visual studio, my windows update is up to date.
Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteException
Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.
at OxyPlot.PlotModel.Update(Boolean updateData)
at OxyPlot.Wpf.Plot.UpdateModel(Boolean updateData) in c:\TeamCity\buildAgent\work\f48330714bade418\Source\OxyPlot.Wpf\Plot.cs:line 1493
at OxyPlot.Wpf.Plot.UpdateModelAndVisuals(Boolean updateData) in c:\TeamCity\buildAgent\work\f48330714bade418\Source\OxyPlot.Wpf\Plot.cs:line 1506
at OxyPlot.Wpf.Plot.ArrangeOverride(Size arrangeBounds) in c:\TeamCity\buildAgent\work\f48330714bade418\Source\OxyPlot.Wpf\Plot.cs:line 689
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteUIElement.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteUIElement.CreateContent>b__11()
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessQueue(CallQueue queue)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessInboundAsyncQueue(Int32 identity)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessMessage(Int32 msg, IntPtr wParam, Boolean elevatedQuery, Boolean& handled)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.OnWindowMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at Microsoft.Expression.DesignHost.Isolation.Remoting.MessageOnlyHwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at Microsoft.Expression.DesignHost.Isolation.IsolationProcess.RunApplication()
at Microsoft.Expression.DesignHost.Isolation.IsolationProcess.<>c__DisplayClass2.<Main>b__0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
My Visual studio configuration :
Microsoft Visual Studio Ultimate 2012
Version 11.0.60610.01 Update 3
Microsoft .NET Framework
Version 4.5.50709
The package I got from nuget:
<package id="OxyPlot.Core" version="2013.1.52.1" targetFramework="net45" />
<package id="OxyPlot.Wpf" version="2013.1.52.1" targetFramework="net45" />
I use .NET 4.5 for my WPF application.

About workaround, im currently using the no Pcl package to resolve my issue. OxyPlot.Wpf_NoPCL
But the noPCL is not as updated as the one with Pcl, so I guess this solution is temporary.
Aug 1, 2013 at 12:06 AM
nobody still reproduce the bug ?
Coordinator
Aug 7, 2013 at 12:18 PM
No, I cannot reproduce this.
I created a new WPF/.NET 4.5 project and added the OxyPlot.WPF 2013.1.52 nuget package.

I am using
Microsoft Visual Studio Premium 2012
Version 11.0.60610.01 Update 3
Microsoft .NET Framework
Version 4.5.50709

on a clean machine with a fresh installation of Visual Studio.
Aug 27, 2013 at 8:19 PM
It seems that there is a fix for the nuget package, but what about the downloadable .zip releases?

I'm having this issue with the NET45 WPF DLLs from OxyPlot-2013.1.67.1.zip. I have all the latest updates for Windows 7, .NET 4.5, and VS 2012. Any suggestions?
Coordinator
Aug 27, 2013 at 11:06 PM
I have tested OxyPlot-2013.1.67.1.zip with .NET 4.5, VS 2012 version 11.0.60610.01 Update 3 on Windows 8 without any issues.
Do you have the latest update (3) of Visual Studio?
Aug 28, 2013 at 2:19 PM
I am also using VS 2012 version 11.0.60610.01 Update 3, but I'm on Windows 7 SP 1.
Nov 19, 2013 at 9:24 PM
I had the same problem in one of my development environments. It took me hours to solve...

I've just repaired Visual Studio installation, that also repaired .Net Framework 4.5 installation as well.
Nov 23, 2013 at 5:30 PM
I had the same issue after updating the NuGet package. Repairing the VS 2012 installation did the trick.
Jun 16, 2014 at 5:25 PM
Just install Visual Studio 2012 Update 4!

It worked for me!