我正在尝试使用 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:ProjectsDynamicDataDisplayChartsAxesNumericNumericAxisControl.cs:line 10
at Microsoft.Research.DynamicDataDisplay.Charts.NumericAxis..ctor() in c:ProjectsDynamicDataDisplayChartsAxesNumericNumericAxis.cs:line 18
at Microsoft.Research.DynamicDataDisplay.Charts.HorizontalAxis..ctor() in c:ProjectsDynamicDataDisplayChartsAxesNumericHorizontalAxis.cs:line 18
at Microsoft.Research.DynamicDataDisplay.ChartPlotter..ctor() in c:ProjectsDynamicDataDisplayChartPlotter.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:
自己的问题和自己的解决方案:)我解决了我的问题。问题是库和测试项目构建目标平台不一致。当我将测试项目构建目标平台从 x86 更改为任何 CPU 时,问题解决了。我仍然不明白VS2012错误消息的含义:)但无论如何问题都解决了。