我正在尝试在 Visual Studio for SAP B1 版本 10.00.150 中以调试模式 (x64) 运行插件。这个插件在 9.3 版本中运行良好。
我已使用代码中的正确版本更新了 SAP bob 和 boui 的 .dll 文件。这是一个 Hana DB。我已确保已输入正确的连接字符串以进行调试。
我以管理员身份运行 SAP B1 客户端 x64 和 Visual Studio。
但是,我在这一行得到一个错误:
// First initialize the Company object
Company = new SAPbobsCOM.Company();
错误:
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'SAP_DMS_Integration.Helpers.SboConnection' threw an exception.
Source=SAP_DMS_Integration
StackTrace:
at SAP_DMS_Integration.Helpers.SboConnection.get_SboApplication() in C:\Users\sconsult1\Desktop\CCL\DMS\SAP_DMS_Integration\SAP_DMS_Integration\Helpers\SboConnection.cs:line 17
at SAP_DMS_Integration.GUI..ctor() in C:\Users\sconsult1\Desktop\CCL\DMS\SAP_DMS_Integration\SAP_DMS_Integration\GUI.cs:line 33
at SAP_DMS_Integration.Program.Main() in C:\Users\sconsult1\Desktop\CCL\DMS\SAP_DMS_Integration\SAP_DMS_Integration\Program.cs:line 17
Inner Exception 1:
FileNotFoundException: Retrieving the COM class factory for component with CLSID {632F4591-AA62-4219-8FB6-22BCF5F60100} failed due to the following error: 8007007e The specified module could not be found. (Exception from HRESULT: 0x8007007E).
这是运行的 SAP 版本:
我在代码中为版本添加了正确的 .dll 文件:
如何修复此错误?