Cannot register assembly when I used webbrowser in form

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

Cannot register assembly when I used webbrowser in form
 
Forrest




Posts: 6
Joined: 2016-09-11
Error:Cannot register assembly "D:\Aboo\Documents\Visual Studio 2017\Projects\DataMap\DataMap\bin\Debug\DataMap.dll". Exception has been thrown by the target of an invocation.


In my excel com project , I added a new item, win form, and I droped a webbrowser control from toolbox into the form.

in addinmodule.vb I wrote like this:


Public Class AddinModule
    Inherits AddinExpress.MSO.ADXAddinModule
    Dim MapWin As New MapWin


Then the error happened.
enjoy life
Posted 19 Mar, 2017 00:48:10 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Forrest,

Dim MapWin As New MapWin

Replace this with Dim MapWin As MapWin and initialize MapWin in an event of the add-in module. The very first event that Office raises is either OnRibbonBeforeCreate or AddinInitialize (this depends on the Office version and the way you start the host application).

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Mar, 2017 04:04:12 Top
Forrest




Posts: 6
Joined: 2016-09-11
Thanks, Andrei. It works. Best regards.
enjoy life
Posted 21 Mar, 2017 02:41:00 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hi Forrest,

Thank you for keeping us informed!
Posted 21 Mar, 2017 04:32:39 Top