3

我正在尝试使用 D3。首先我下载了​​最后一个版本并通过VS2012打开它。不做任何更改我尝试运行测试项目,我在运行时收到奇怪的错误消息,详细信息如下。我能解决这个问题吗?

System.Security.VerificationException was unhandled by user code
  HResult=-2146233075
  Message=Operation could destabilize the runtime.
  Source=DynamicDataDisplay
  StackTrace:
       at Microsoft.Research.DynamicDataDisplay.Charts.AxisControl`1..ctor()
       at Microsoft.Research.DynamicDataDisplay.Charts.NumericAxisControl..ctor() in c:\Projects\DynamicDataDisplay\Charts\Axes\Numeric\NumericAxisControl.cs:line 10
       at Microsoft.Research.DynamicDataDisplay.Charts.NumericAxis..ctor() in c:\Projects\DynamicDataDisplay\Charts\Axes\Numeric\NumericAxis.cs:line 18
       at Microsoft.Research.DynamicDataDisplay.Charts.HorizontalAxis..ctor() in c:\Projects\DynamicDataDisplay\Charts\Axes\Numeric\HorizontalAxis.cs:line 18
       at Microsoft.Research.DynamicDataDisplay.ChartPlotter..ctor() in c:\Projects\DynamicDataDisplay\ChartPlotter.cs:line 16
       at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.InvokeDelegate(Action`1 action, Object argument)
       at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CallCtorDelegate(XamlTypeInvoker type)
       at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CreateInstance(XamlTypeInvoker type)
       at System.Xaml.Schema.XamlTypeInvoker.CreateInstance(Object[] arguments)
       at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstanceWithCtor(XamlType xamlType, Object[] args)
       at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args)
  InnerException:
4

1 回答 1

1

自己的问题和自己的解决方案:) 我解决了我的问题。问题是库和测试项目构建目标平台不一致。当我将测试项目构建目标平台从 x86 更改为任何 cpu 时,问题就解决了。仍然我不明白VS2012错误信息的含义:)但无论如何问题都解决了。

于 2012-12-07T12:11:15.140 回答