问题描述
似乎Forge Design Automation无法在当天早些时候进行的活动中运行功能。没有对应用程序捆绑包或活动进行任何更新。我该如何解决这个问题?
[09/02/2020 16:11:16] InventorCoreConsole.exe Error: 0 : Processing failed. System.IO.FileNotFoundException: Could not load file or assembly 'Autodesk.Inventor.Interop,Version=24.0.0.0,Culture=neutral,PublicKeyToken=d84147f8b4276564' or one of its dependencies. The system cannot find the file specified.
[09/02/2020 16:11:16] File name: 'Autodesk.Inventor.Interop,PublicKeyToken=d84147f8b4276564'
[09/02/2020 16:11:16] at UpdateUserParametersPlugin.SampleAutomation.GetQuote(String quoteFileName,String currentDir,Object doc,String quoteTemplate,String userName,String userEmail)
[09/02/2020 16:11:16] at UpdateUserParametersPlugin.SampleAutomation.Run(Document placeholder) in C:\Users\kate.hilton\Desktop\da-update-user-params-master\da-update-user-params-master\UpdateUserParameters\UpdateUserParametersPlugin\SampleAutomation.cs:line 213
[09/02/2020 16:11:16] WRN: Assembly binding logging is turned OFF.
[09/02/2020 16:11:16] To enable assembly bind failure logging,set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
[09/02/2020 16:11:16] Note: There is some performance penalty associated with assembly bind failure logging.
[09/02/2020 16:11:16] To turn this feature off,remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
[09/02/2020 16:11:16] InventorCoreConsole.exe Information: 0 : Performing iLogic diagnostics...
[09/02/2020 16:11:16] InventorCoreConsole.exe Error: 0 : Diagnostics failed: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference
[09/02/2020 16:11:16] at CallSite.Target(Closure,CallSite,Object )
[09/02/2020 16:11:16] at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site,T0 arg0)
[09/02/2020 16:11:16] at IvCoreConsole.Inv.InventorServerApp.PerformiLogicDiagnostics()
[09/02/2020 16:11:16] InventorCoreConsole.exe Information: 0 : End of iLogic diagnostics...
[09/02/2020 16:11:16] InventorCoreConsole.exe Information: 0 : Deactivating plug-in: UpdateUserParametersPlugin
[09/02/2020 16:11:16] InventorCoreConsole.exe Information: 0 : : UpdateUserParametersPlugin: deactivating...
[09/02/2020 16:11:17] End Inventor Core Engine standard output dump.
第213行:
var quoteFileName = Path.Combine(Path.GetDirectoryName(pathName),"Quote.txt");
LogTrace($"Getting the quote: filepath = {quoteFileName}");
(213) GetQuote(quoteFileName,currDir,aDoc,quoteTemplate,userName,userEmail);
解决方法
奇怪的是,它以前工作过。似乎您正在以某种不适用于FDA的方式引用Autodesk.Inventor.Interop DLL。您可以尝试在插件包中制作正确版本的Autodesk.Inventor.Interop DLL。如果那行不通,您可以在此处发布如何在csproj文件中引用它吗?