我正在使用Object ARX 2015和.Net Framework编写AutoCad扩展。在我的电脑上一切正常。但是当我尝试在其他计算机上使用我的.dll时。我收到这个错误:
例外文字
System.TypeLoadException:无法加载类型 来自程序集'系统的'System.Windows.Input.ICommand', Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'。 在Extension.MyCommands.KeelRibbon() at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorker(MethodInfo mi,Object commandObject,Boolean bLispFunction) at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo) mi,Object commandObject,Boolean bLispFunction) 在Autodesk.AutoCAD.Runtime.PerDocumentCommandClass.Invoke(MethodInfo mi, Boolean bLispFunction) 在Autodesk.AutoCAD.Runtime.CommandClass.CommandThunk.Invoke()
答案 0 :(得分:0)
由于此类是.Net Framework的一部分,因此如果安装了正确的.Net版本,它应该可以在计算机上使用。我建议采用以下解决方案之一:
希望有所帮助
答案 1 :(得分:0)
对于AutoCAD 2015,您需要将.NET 4.5设置为Visual Studio项目的目标。