The assembly 'AddinExpress.MSO.2005 is not registered for COM Interop

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

The assembly 'AddinExpress.MSO.2005 is not registered for COM Interop
on Jenkins Job without Add-In Express Installation 
Christopher Thiede




Posts: 38
Joined: 2016-07-05
Hi,

I get trouble with my CI Jenkins Jobs. In our Project we add the tag

    <RegisterForComInterop>true</RegisterForComInterop>

via ContextMenu of Project/Add-In Express/Register to debug our Add-In.
On our develooper mashines it runs and builds. But on our CI Jenkins Server the job failes with the Message:

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4335,5): error MSB3211: The assembly 'AddinExpress.MSO.2005, Version=8.4.4395.0, Culture=neutral, PublicKeyToken=4416dd98f0861965-Assembly is not registered for COM Interop. Please register it with regasm.exe /tlb.

Without the tag <RegisterForComInterop> it works.
Our Add-In Project is build for target Any CPU. With CPU target x86 or x64 it works but not for Any CPU.

Any suggestion to make it work for Any CPU?
Posted 28 Dec, 2016 07:37:01 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Hello Christopher,

You need to set RegisterForComInterop to false when building the add-in project. Setting this option to true is only required for registering the add-in on the PC and debugging it; doing this isn't required to build the add-in assembly.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Dec, 2016 08:08:40 Top
Christopher Thiede




Posts: 38
Joined: 2016-07-05
I guess this. But I think we are not disciplined enough to delete this tag on each commit. Is there another solution or is it a know problem?
Posted 28 Dec, 2016 08:45:26 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Hello Christopher,

You can modify that tag programmatically before building the project.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 Dec, 2016 03:54:27 Top
thiede




Posts: 38
Joined: 2016-07-05
Hi Andrei,

do you mean with a before build target/step or with another program/script?
Posted 03 Jan, 2017 05:42:42 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hello Christopher,

You can create a new solution/project configuration especially for building and set <RegisterForComInterop>false</RegisterForComInterop> in that new PropertyGroup. Does this solution suit you?
Posted 03 Jan, 2017 09:08:28 Top
thiede




Posts: 38
Joined: 2016-07-05
Hi Dmitry,

yes it works for me. I add a PropertyGroup with a Condition and add a Parameter for MSBuild in my Jenkins Job.

Thanks a lot
Christopher
Posted 04 Jan, 2017 10:03:18 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hello Christopher,

Thank you for keeping us informed!
Posted 04 Jan, 2017 10:35:57 Top