I am trying to run an addon in debug mode (x64) in Visual Studio for SAP B1 version 10.00.150. This addon worked well in version 9.3.
I have updated the .dll files for SAP bobs and boui with the correct version in the code. This is a Hana DB. I have made sure I have put in the correct connection string for debug.
I am running both SAP B1 client x64 and Visual Studio as administrator.
However, I get an error at this line:
// First initialize the Company object
Company = new SAPbobsCOM.Company();
Error:
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).
This is the SAP version running:
I have added the correct .dll files for the version in code:
How do I fix this error?