System.IO.FileNotFoundException 未处理 - Autodesk Navisworks API
System.IO.FileNotFoundException was unhandled - Autodesk Navisworks API
我指的是 Navisworks 2016 API Training Labs 中的 Nw_Single_Doc_With_View(用 C# .NET 编写)。
我添加了 Autodesk 引用 DLL,并在 "Copy Local" 属性 中将它们都设置为 false。 Autodesk API 参考手册已指定在 DLL 中将 "Copy Local" 属性 设置为 false。
当我尝试 运行 项目时,我收到一条错误消息:
System.IO.FileNotFoundException was unhandled
Message: An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'Autodesk.Navisworks.Controls, Version=14.0.1298.75, Culture=neutral, PublicKeyToken=d85e58fa5af9b484' or one of its dependencies. The system cannot find the file specified.
当我尝试查看 "Viewer.cs" [设计] 页面时,我收到如下错误消息:
Severity Code Description Project File Line Suppression State
Message Could not find type 'Autodesk.Navisworks.Api.Controls.DocumentControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU. 0
Message Could not find type 'Autodesk.Navisworks.Api.Controls.ViewControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU. 0
Message The variable 'viewControl' is either undeclared or was never assigned. C:\Users\Joe\Autodesk\Navisworks_2016_API_Training_Labs\Indivudual labs\Nw_Single_Doc_With_View\Viewer.Designer.cs 150
我附上了几个屏幕截图和示例项目供您参考。
a) 示例项目:Navisworks_2016_API_Training_Labs.zip
b) Navisworks 的 DLL 位置:
c) .NET 框架
d) Autodesk API 手册:Autodesk API Reference Manual
为了您的信息,我的电脑是 Windows 7 64 位。
你能告诉我为什么会出现这个错误吗?我该如何解决?
谢谢
P/S:我已经在 Autodesk Navisworks 论坛 here 上发布了我的问题,但目前没有任何回复。
我的问题已经解决了。基本上,您的计算机上需要有有效的 Navisworks 许可证。然后就可以运行项目顺利了
之前我使用的是 Navisworks 试用版,但收到的错误消息是 "System.IO.FileNotFoundException was unhandled"。
我指的是 Navisworks 2016 API Training Labs 中的 Nw_Single_Doc_With_View(用 C# .NET 编写)。
我添加了 Autodesk 引用 DLL,并在 "Copy Local" 属性 中将它们都设置为 false。 Autodesk API 参考手册已指定在 DLL 中将 "Copy Local" 属性 设置为 false。
当我尝试 运行 项目时,我收到一条错误消息:
System.IO.FileNotFoundException was unhandled Message: An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll Additional information: Could not load file or assembly 'Autodesk.Navisworks.Controls, Version=14.0.1298.75, Culture=neutral, PublicKeyToken=d85e58fa5af9b484' or one of its dependencies. The system cannot find the file specified.
当我尝试查看 "Viewer.cs" [设计] 页面时,我收到如下错误消息:
Severity Code Description Project File Line Suppression State Message Could not find type 'Autodesk.Navisworks.Api.Controls.DocumentControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU. 0
Message Could not find type 'Autodesk.Navisworks.Api.Controls.ViewControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU. 0
Message The variable 'viewControl' is either undeclared or was never assigned. C:\Users\Joe\Autodesk\Navisworks_2016_API_Training_Labs\Indivudual labs\Nw_Single_Doc_With_View\Viewer.Designer.cs 150
我附上了几个屏幕截图和示例项目供您参考。
a) 示例项目:Navisworks_2016_API_Training_Labs.zip
b) Navisworks 的 DLL 位置:
c) .NET 框架
d) Autodesk API 手册:Autodesk API Reference Manual
为了您的信息,我的电脑是 Windows 7 64 位。
你能告诉我为什么会出现这个错误吗?我该如何解决? 谢谢
P/S:我已经在 Autodesk Navisworks 论坛 here 上发布了我的问题,但目前没有任何回复。
我的问题已经解决了。基本上,您的计算机上需要有有效的 Navisworks 许可证。然后就可以运行项目顺利了
之前我使用的是 Navisworks 试用版,但收到的错误消息是 "System.IO.FileNotFoundException was unhandled"。