AddInExpress.Wizard register ADX exception

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

AddInExpress.Wizard register ADX exception
exception handling 
Kevin Curry




Posts: 9
Joined: 2007-01-03
What causes "Exception has been thrown by the target of an invocation" when executing "Register ADX Project" or "Unregister...?" I get this all the time and only resolve it by dumb luck and trial and error. I've read some things about cleaning the registry but that doesn't work (and is a real pain anyway). Does choosing that option do anything more than check/uncheck the "Register for COM interop" setting in the project Properties?
Posted 05 Jan, 2007 16:26:10 Top
Kevin Curry




Posts: 9
Joined: 2007-01-03
And when I follow the directions from: "Display the COM Add-ins...command in a toolbar" It says the location my add-in is C:\WINDOWS\system32\mscoree.dll. That's clearly wrong.
Posted 05 Jan, 2007 16:52:36 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Kevin.

Did you add any code to the addinmodule constructor manually?

The location of your add-in is correct. The mscoree.dll is the Microsoft .NET Runtime Execution Engine which hosts the .NET CLR in an unmanaged environment.


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 08 Jan, 2007 07:32:18 Top
Kevin Curry




Posts: 9
Joined: 2007-01-03
There's just this one added line in AddinModule() other than InitializeComponent():

BBSwitch.Level = TraceLevel.Verbose;

BBSwitch is one of our objects.

Does that cause a problem? If so, please help me understand what it is.

Meantime I'll comment it out and keep testing.

FYI, I picked this project up from another developer so I'm not 100% sure what's yours and what's his. It looks like InitializeComponent is still just the auto-generated stuff.

Also, regarding the .Net Runtime Engine - what drew my attention was that Google's Add-Ins point to Google libraries in Google folders under Program Files.
Posted 08 Jan, 2007 11:30:21 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Kevin, to register the add-in the Add-in Express .NET creates an instance of the AddinModule class. So please don't add any code to the constaructor.
You can use the AddinInitialize or AddinStartupComplete event handlers instead.

Also, regarding the .Net Runtime Engine - what drew my attention was that Google's Add-Ins point to Google libraries in Google folders under Program Files.

You can use the ADX loader instead of the mscoree.dll. In this case your add-in will be loaded as '.\Program Files\<the add-in directory>\adxloader.dll'.
Please read the following article to learn how you can migrate from the mscoree.dll to the adxloader.dll.
http://www.add-in-express.com/creating-addins-blog/2006/08/04/shim-loader-mscoree/




Posted 08 Jan, 2007 11:42:12 Top
Kevin Curry




Posts: 9
Joined: 2007-01-03
Re: loader - I am familiar shim and loader documentation. This project was never configured as a shim build. We've always included adxloader.dll in the project Loader folder. My COM Add-In location is now a path like '.\Program Files\<the add-in directory>\adxloader.dll'. Yet, I am not doing anything different. I am only rebuilding, unregistering, registering, uninstalling, installing using the ADX right-click menu items. Still, your information helps me debug. Thanks again. Also, I'm still having issues with the dropdown. I'll post separately under that thread to keep the issues straight.
Posted 08 Jan, 2007 14:16:51 Top