WPF开发CAD的问题
用WPF开发AUTOCAD.NET 程序的三种用法(学习笔记)http://bbs.mjtd.com/forum.php?mod=viewthread&tid=84848&fromuid=365479
我下载了该例子中的入门范例,在VS08的环境中无任何问题,但是直接在CAD中netload加载dll出现的错误提示,期待高人解决
不详细啊,详细信息 就是代码在VS环境下运行很正常,但是直接用cad加载dll就出现那个错误了 我怀疑CAD2008不支持WPF 很明显是运行时错误,你可以看看详细信息中的提示,一般会说明是哪一行的,你就在前面查看一下 本帖最后由 lxf0802 于 2011-7-1 09:31 编辑
看不出行号,因为不是调试状态,调试状态下是没有这个问题的。直接cad加载dll出现的错误,错误的详细信息如下:
应用程序不支持实时(JIT)调试。
有关详细信息,请参见此消息的结尾。
************** 异常文本 **************
System.InvalidOperationException: 由于其他线程拥有此对象,因此调用线程无法对其进行访问。
在 System.Windows.Threading.Dispatcher.VerifyAccess()
在 System.Windows.Threading.DispatcherObject.VerifyAccess()
在 MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
在 MS.Internal.Media.VisualTreeUtils.AsNonNullVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
在 System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
在 System.Windows.UIElement.GetUIParentWithinLayoutIsland()
在 System.Windows.ContextLayoutManager.LayoutQueue.Add(UIElement e)
在 System.Windows.UIElement.InvalidateArrange()
在 System.Windows.UIElement.InvalidateVisual()
在 System.Windows.Forms.Integration.ElementHost.OnPaintBackground(PaintEventArgs pevent)
在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
在 System.Windows.Forms.Control.WmPaint(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.Integration.ElementHost.WndProc(Message& m)
问题已经解决,换了cad2010就没有问题,看来cad2008还是不能完全支持wpf cad2008确实不支持WPF,不过调试状态居然能正常运行,还是出乎意料。。。
页:
[1]