Attempting to create a new instance of the managed add-in class

Add-in Express™ Support Service
That's what is more important than anything else

Attempting to create a new instance of the managed add-in class
Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319 and Error code: 0x80131604 
Josep Llort Tella




Posts: 34
Joined: 2012-01-18
I have two add-ons one for word and one for outlook, once installed do not display the toolbars respectively I currently have the 2013 version of microsoft office.
The adxloader file in the case of outlook indicates the following:


16:23:34:265 3568 8004 Creating a new application domain.
16:23:34:276 3568 8004 Success.
16:23:34:276 3568 8004 Creating an instance of the managed class. Assembly identity: 'OpenKMOutlookAddIn'
16:23:34:388 3568 8004 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
16:23:34:388 3568 8004 Creating an instance of the managed class. Assembly identity: 'OpenKMOutlookAddIn'
16:23:35:122 3568 8004 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
16:23:35:122 3568 8004 Creating an instance of the managed class. Assembly identity: 'OpenKMOutlookAddIn'


And in the case of word:

12:11:20:753 1672 6160 Creating a new application domain.
12:11:20:757 1672 6160 Success.
12:11:20:757 1672 6160 Creating an instance of the managed class. Assembly identity: 'OKMWordAddIn'
12:11:20:837 1672 6160 Error code: 0x80131604


Why is this happening?
I look forward to your collaboration, thank you in advance.
Posted 07 Apr, 2017 08:57:09 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Josep,

I would start with uninstalling .NET Framework 4.X and installing it anew.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Apr, 2017 09:07:18 Top
Josep Llort Tella




Posts: 34
Joined: 2012-01-18
I followed his instructions, but I still do not see the toolBars of my addins in outllok as in word.
I have the NET Framework 4.6.1., the error of the first comment still persists:


Startup directory: C:\Users\Sascha\AppData\Local\OpenKM\OKMOutlookAddIn\
Loader version: 7.4.4067.0
Operating System: Microsoft Windows 7 Professional Service Pack 1 (build 7601), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files\Microsoft Office\Office15\OUTLOOK.EXE"
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
------------------------------------------------------------------------
16:23:34:245 3568 8004 Start.
16:23:34:245 3568 8004 Reading the registry key 'HKEY_CLASSES_ROOT\CLSID\{AE27ADC9-1254-4B80-A0D6-D3B5F4E7DF19}'
16:23:34:245 3568 8004 Success. The registry key 'HKEY_CLASSES_ROOT\CLSID\{AE27ADC9-1254-4B80-A0D6-D3B5F4E7DF19}' is closed.
16:23:34:245 3568 8004 Converting the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID from string.
16:23:34:245 3568 8004 Success.
16:23:34:245 3568 8004 Attempting to get the class object by the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID.
16:23:34:245 3568 8004 Success.
16:23:34:245 3568 8004 Creating a new instance of the add-in loader.
16:23:34:245 3568 8004 Loading mscoree.dll
16:23:34:245 3568 8004 Success.
16:23:34:245 3568 8004 Loading the configuration from the system registry.
16:23:34:245 3568 8004 Getting the latest CLR version.
16:23:34:245 3568 8004 The latest CLR version is 'v4.0.30319'.
16:23:34:245 3568 8004 The configuration has been loaded successfully.
16:23:34:245 3568 8004 Runtime version: v4.0.30319.
16:23:34:245 3568 8004 Assembly name: OpenKMOutlookAddIn.
16:23:34:245 3568 8004 Class name: OKMOutlookAddIn.AddinModule.
16:23:34:245 3568 8004 Registry key: CLSID\{AE27ADC9-1254-4B80-A0D6-D3B5F4E7DF19}.
16:23:34:255 3568 8004 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
16:23:34:255 3568 8004 Loading CLR: v4.0.30319.
16:23:34:255 3568 8004 Calling CLRCreateInstance method.
16:23:34:255 3568 8004 Success.
16:23:34:255 3568 8004 Calling GetRuntime method.
16:23:34:255 3568 8004 Success.
16:23:34:255 3568 8004 Checking if the hosting API of .NET Framework v4.0 beta is installed.
16:23:34:265 3568 8004 The hosting API is up to date.
16:23:34:265 3568 8004 Calling GetInterface method for the CorRuntimeHost interface.
16:23:34:265 3568 8004 Success.
16:23:34:265 3568 8004 Starting CLR...
16:23:34:265 3568 8004 Success.
16:23:34:265 3568 8004 Getting the CLR version.
16:23:34:265 3568 8004 The CLR v4.0.30319 has been initialized successfully.
16:23:34:265 3568 8004 Creating a new domain setup.
16:23:34:265 3568 8004 Success.
16:23:34:265 3568 8004 Getting the add-in directory.
16:23:34:265 3568 8004 Success. The directory is 'C:\Users\Sascha\AppData\Local\OpenKM\OKMOutlookAddIn\'
16:23:34:265 3568 8004 The 'shadow copy' is enabled.
16:23:34:265 3568 8004 Creating a new application domain.
16:23:34:276 3568 8004 Success.
16:23:34:276 3568 8004 Creating an instance of the managed class. Assembly identity: 'OpenKMOutlookAddIn'
16:23:34:388 3568 8004 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
16:23:34:388 3568 8004 Creating an instance of the managed class. Assembly identity: 'OpenKMOutlookAddIn'
16:23:35:122 3568 8004 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
16:23:35:122 3568 8004 Creating an instance of the managed class. Assembly identity: 'OpenKMOutlookAddIn'
Posted 10 Apr, 2017 15:32:58 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Josep,

Thank you for posting the adxloader.log file. It shows that you use Add-in Express 7.4. Switch to using Add-in Express 8.6 and make sure that you use adxloader.dll from the latest build. Please let me know if this solves the problem.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Apr, 2017 06:07:38 Top
Josep Llort Tella




Posts: 34
Joined: 2012-01-18
Hollo Andrei,

Upgrade to the Add-in Express 8.6 version, but the toolbar is not yet visible.

Loader Log File:

Add-in Express Loader Log File: 04/16/2017 21:15:45:950

Startup directory: C:UsersSaschaAppDataLocalOpenKMOKMWordAddIn
Loader version: 8.6.4408.0
Operating System: Microsoft Windows 7 Professional Service Pack 1 (build 7601), 64-bit
Process Owner: Administrator
Command Line: "C:Program FilesMicrosoft OfficeOffice15WINWORD.EXE" 
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
------------------------------------------------------------------------
21:15:45:950 2104 4164 Start.
21:15:45:950 2104 4164 Creating a new instance of the add-in loader.
21:15:45:950 2104 4164 Loading mscoree.dll
21:15:45:950 2104 4164 Success.
21:15:45:950 2104 4164 Loading the configuration from the system registry.
21:15:45:950 2104 4164 Getting the latest CLR version.
21:15:45:950 2104 4164 The latest CLR version is 'v4.0.30319'.
21:15:45:950 2104 4164 The configuration has been loaded successfully.
21:15:45:950 2104 4164     Runtime version: v4.0.30319.
21:15:45:966 2104 4164     Assembly name: OKMWordAddIn.
21:15:45:966 2104 4164     Class name: OKMWordAddIn.AddinModule.
21:15:45:966 2104 4164     Registry key: CLSID{B8D021F1-9304-4FF2-ADA8-30035549AFE0}.
21:15:45:966 2104 4164 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
21:15:45:966 2104 4164 Loading CLR: v4.0.30319.
21:15:45:966 2104 4164 Calling CLRCreateInstance method.
21:15:45:966 2104 4164 Success.
21:15:45:966 2104 4164 Calling GetRuntime method.
21:15:45:966 2104 4164 Success.
21:15:45:966 2104 4164 Checking if the hosting API of .NET Framework v4.0 beta is installed.
21:15:45:966 2104 4164 The hosting API is up to date.
21:15:45:966 2104 4164 Calling GetInterface method for the CorRuntimeHost interface.
21:15:45:966 2104 4164 Success.
21:15:45:966 2104 4164 Starting CLR...
21:15:45:966 2104 4164 Success.
21:15:45:966 2104 4164 Getting the CLR version.
21:15:45:966 2104 4164 The CLR v4.0.30319 has been initialized successfully.
21:15:45:966 2104 4164 Creating a new domain setup.
21:15:45:966 2104 4164 Success.
21:15:45:966 2104 4164 Getting the add-in directory.
21:15:45:966 2104 4164 Success. The directory is 'C:UsersSaschaAppDataLocalOpenKMOKMWordAddIn'
21:15:45:966 2104 4164 The 'shadow copy' is enabled.
21:15:45:966 2104 4164 Creating a new application domain.
21:15:45:968 2104 4164 Success.
21:15:45:968 2104 4164 Creating an instance of the managed class. Assembly identity: 'OKMWordAddIn'
21:15:46:122 2104 4164 Se produjo una excepci?n en el destino de la invocaci?n. Error code: 0x80131604


Registrator Log File:

Installation directory: C:UsersSaschaAppDataLocalOpenKMOKMWordAddIn
Registrator version: 8.6.4408.0
Operating System:  Microsoft Windows 7 Professional Service Pack 1 (build 7601), 64-bit
Process Owner: Administrator
Command Line: "C:Program FilesMicrosoft OfficeOffice15WINWORD.EXE" 
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
--------------------------------------------------------------
21:15:07 0384 Starting the add-in registration process.
21:15:07 0384 Loading mscoree.dll
21:15:07 0384 Success.
21:15:07 0384 .NET Framework installation directory: 
21:15:07 0384 The latest version of .NET Framework: 'v4.0.30319'
21:15:07 0384 Loading CLR: v4.0.30319.
21:15:07 0384 Calling CLRCreateInstance method.
21:15:07 0384 Success.
21:15:07 0384 Calling GetRuntime method.
21:15:07 0384 Success.
21:15:07 0384 Checking if the hosting API of .NET Framework v4.0 beta is installed.
21:15:07 0384 The hosting API is up to date.
21:15:07 0384 Calling GetInterface method for the CorRuntimeHost interface.
21:15:07 0384 Success.
21:15:07 0384 Starting CLR...
21:15:08 0384 Success.
21:15:08 0384 Getting the CLR version.
21:15:08 0384 The CLR v4.0.30319 has been initialized successfully.
21:15:08 0384 Creating a new domain setup.
21:15:08 0384 Success.
21:15:08 0384 Getting the add-in directory.
21:15:08 0384 Success. The directory is 'C:UsersSaschaAppDataLocalOpenKMOKMWordAddIn'
21:15:08 0384 The 'shadow copy' is disabled.
21:15:08 0384 Creating a new application domain.
21:15:08 0384 Success.
21:15:08 0384 Getting the base directory for the domain.
21:15:08 0384 Success. The directory is 'C:UsersSaschaAppDataLocalOpenKMOKMWordAddIn'.
21:15:08 0384 Searching for the Add-in Express core library.
21:15:08 0384 Success. The 'AddinExpress.MSO.2005.dll' file is found.
21:15:08 0384 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
21:15:08 0384 Assembly identity is 'AddinExpress.MSO.2005'.
21:15:08 0384 Success.
21:15:08 0384 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
21:15:08 0384 Success.
21:15:08 0384 Calling the managed registration procedure (DISPID = 1610743823).
21:15:09 0384 Registration success.
21:15:09 0384 The add-in registration process is completed with HRESULT = 0.

Posted 17 Apr, 2017 10:43:22 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Thank you Josep,

If you have custom code in the constructor of the add-in module, comment it out or move it to an event of the add-in module (best candidates are the AddinInitialize or OnRibbonBeforeCreate events). The same applies to initializers of complex-type variables declared on the class level in the add-in module. Say, if you have

SomeType someVar = null;


you need to replace it with

SomeType someVar;


and initialize this variable in an above-mentioned event. Please let me know if this helps.


Andrei Smolin
Add-in Express Team Leader
Posted 18 Apr, 2017 03:18:41 Top
Josep Llort Tella




Posts: 34
Joined: 2012-01-18
Hello Andrei
I moved my constructor code to the AddingInitialize event and replaced two variables whose value was Null, as you indicated, but I still do not see toolbar.
I also reinstalled the addin-express and nothing.

An exception occurred at the destination of the invocation. Error code: 0x80131604

Regards.
Posted 19 Apr, 2017 15:05:28 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Josep,

Please send me a project reproducing the issue to the support email address. You can find it in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 20 Apr, 2017 06:20:26 Top
Josep Llort Tella




Posts: 34
Joined: 2012-01-18
Hello Andrei
In some computers I worked and in others not, it turns out I had a subproject for x86 architecture that changed to any cpu, now it works for me.
Thanks for your attention.
Posted 28 Apr, 2017 12:57:01 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
You are welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 01 May, 2017 04:35:18 Top