Upgrade to Office 2016 and ADXv8 wont register addin

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

Upgrade to Office 2016 and ADXv8 wont register addin
 
Bert Sinnema


Guest


Hi,

I upgraded my machine to Windows10 + Office 2016. I have an add-in i was developing on VS2013 and Outlook 2013. After upgrading to Outlook 2016 and ADXv8, still with VS2013, the addin won't register:


Error	4	Cannot register assembly "C:***AttachingIT.AddIn.Express.dll". Exception has been thrown by the target of an invocation.	AttachingIT.Outlook.AddIn.Express


I did forget to unregister before removing v7 of ADX. Unregistering doesnt work either and manually removing the addin from outlook didnt help either. Any ideas?

Cheers
Posted 12 Oct, 2015 04:31:33 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Bert,

Please check if clearing all check boxes in the Configuration Manager dialog allows you to continue.


Andrei Smolin
Add-in Express Team Leader
Posted 12 Oct, 2015 05:32:37 Top
Bert Sinnema


Guest


Hello Andrei,

It did now ask me to update the loader, I clicked "update". Now I still get the error on Registering, when I try to unregister I get this exception,


Detailed technical information follows: 
---
(Inner Exception)
(Inner Exception)
Date and Time:         12-10-15 12:33:30
Machine Name:          LENOVO-PC
IP Address:            fe80::442e:2c29:7926:cf91%12
Current User:          LENOVO-PCBert

Application Domain:    DefaultDomain
Assembly Codebase:     file:///C:/Program Files (x86)/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2005/AddinExpress.Wizard.dll
Assembly Full Name:    AddinExpress.Wizard, Version=8.0.4327.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version:      8.0.4327.0

Exception Source:      System.Windows.Forms
Exception Type:        System.InvalidOperationException
Exception Message:     Thread exception mode cannot be changed once any Controls are created on the thread.

---- Stack Trace ----



(Outer Exception)
Date and Time:         12-10-15 12:33:30
Machine Name:          LENOVO-PC
IP Address:            fe80::442e:2c29:7926:cf91%12
Current User:          LENOVO-PCBert

Application Domain:    DefaultDomain
Assembly Codebase:     file:///C:/Program Files (x86)/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2005/AddinExpress.Wizard.dll
Assembly Full Name:    AddinExpress.Wizard, Version=8.0.4327.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version:      8.0.4327.0

Exception Source:      mscorlib
Exception Type:        System.Reflection.TargetInvocationException
Exception Message:     Exception has been thrown by the target of an invocation.

---- Stack Trace ----



(Outer Exception)
Date and Time:         12-10-15 12:33:30
Machine Name:          LENOVO-PC
IP Address:            fe80::442e:2c29:7926:cf91%12
Current User:          LENOVO-PCBert

Application Domain:    DefaultDomain
Assembly Codebase:     file:///C:/Program Files (x86)/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2005/AddinExpress.Wizard.dll
Assembly Full Name:    AddinExpress.Wizard, Version=8.0.4327.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version:      8.0.4327.0

Exception Source:      AddinExpress.Wizard
Exception Type:        System.Exception
Exception Message:     The 'RegisterAssembly' function failed.
Exception Target Site: dteBuildEvents_OnBuildProjConfigDone

---- Stack Trace ----
   AddinExpress.Projects.Common.Registrator.dteBuildEvents_OnBuildProjConfigDone(projectUniqueName As String, ProjectConfig As String, Platform As String, SolutionConfig As String, Success As Boolean)
       AddinExpress.Wizard.dll: N 0746 (0x2EA) IL 



Posted 12 Oct, 2015 05:41:41 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Bert Sinnema writes:
Exception Message: Thread exception mode cannot be changed once any Controls are created on the thread.


This exceptions means two things are wrong:

1) you call a control from another thread. This isn't correct because controls belong to the main thread
2) you perform all this in the constructor of the add-in module. This isn't correct because the constructor is tun outside of the host application's process when you register or unregister the add-in. You need to use the AddinInitialize or OnRibbonBeforeCreate event instead.


Andrei Smolin
Add-in Express Team Leader
Posted 12 Oct, 2015 05:47:03 Top
Bert Sinnema


Guest


I'm not sure but it looks like this is not in my code. It looks like it's in yours. I've never seen the AddinExpress.Wizard class before. It runs fine on my ADXv7/Outlook2013 setup.
Posted 12 Oct, 2015 05:53:28 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
To register your add-in, the wizard tries to create an instance of the add-in module. This attempt fails because of the above-described problem in the constructor of the add-in module. It is easy to check this statement: just comment out all custom code in the constructor of the add-in module.


Andrei Smolin
Add-in Express Team Leader
Posted 12 Oct, 2015 06:06:39 Top
Bert Sinnema


Guest


Weird, was indeed something in the constructor.

Couldn't handle this code:

            Application.ThreadException += Application_ThreadException;
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);


It build fine and it say's it's registered, I even see it in the registry. Althoug I don't see it in Outlook 2016 nor in the COM add-ins list of outlook 2016. Any ideas?
Posted 12 Oct, 2015 10:34:57 Top
Bert Sinnema


Guest


Got a bit further,

When I set RegisterForAllUsers to false I get the add-in in Outlook 2016, when I set it to true it doesn't show up. Is my registry messed up?
Posted 12 Oct, 2015 11:34:30 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Bert,

The registry may be messed up. To solve this, I would suggest that you uninstall the add-in if it is installed. Then unregister the add-in from the IDE, change RegisterForAllUsers and unregister it once again.

You need to follow instructions in the manual, see section "Deploying a per-user Office extension via an MSI installer" or "Deploying a per-machine Office extension via an MSI installer" depending on your goals. The instructions are given for the Visual Studio Installer. If you use another installation software product, you'll need to "translate" the instructions to the "language" of the installation product that you use.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Oct, 2015 04:07:34 Top
Bert Sinnema


Guest


Hi Andrei,

All does not work, can you tell me why I need to follow documentation on Deploying? I'm simply trying to get the IDE to register it so I can work on it. After installing version 8 it immediately wants to update the loader. I clicked "Update loarder" does this automatically apply to the project?

I'm kind of lost
Posted 13 Oct, 2015 07:56:56 Top