Add-in behaviour different when deployed

T

tartancli

Hi,

I have a problem in that i have developed a C# addin for Word in VS2003 (not
VSTO). This add-in works fine on the development machine but when i deploy it
to another machine I get the following behaviour from the addin:

The add-in contructor is called.
The add-in OnConnection method is called.
The add-in OnAddInsUpdate method is called.
Then the OnStartupComplete method is NOT called.
The OnDisconnect method is called when the application is closed.

There is really very little code in the OnConnection and OnAddInsUpdate
method to go wrong ... and i would have assumed that if the add-in had thrown
an exception before OnStartupComplete, that it would have been unloaded
immediately (not when Word closes).

I'd be grateful if anybody could guess at whats going on here or point me in
direction of any information on Word add-in architecture (reasons why
OnStartupComplete would not get called) or has any suggestions as to how I
can debug this problem further.

Thanks
 
P

pavan

can you let me know how you found that OnStartupComplete method is NOT
called? Is it that ur code in OnStartupComplete is not getting executed
or you debugged?

anyways, try putting a try-catch in OnStartupComplete. There might be
some exception which Word is eating away. let me know if this helps.
 
T

tartancli

Hi Pavan,

Thanks for reply. Yes, its that the code in OnStartupComplete is not being
run. I show a messagebox dialog in OnConnect and in OnStartupComplete. The
one in OnStartupComplete (at the very start of this method) is not shown.
 
T

tartancli

Hi Pavan,

Yes i tried try- catch, but no exceptions were caught. I can't install
Visual Studio on the deployment macine. Is some kind of remote debugging
possible?
 
I

Ivo86

Hi tartancli,
I have the same problem as yours. The only difference is that I'm using
VS2005.
Did you understand where is the problem?
Why OnStartupComplete is not executing?
I'm thinking to put the OnStartupComplete code in OnConection method and to
put the OnBeginShutdown code in OnDisconnection method just becouse I can't
fix this problem is this solution right?
Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top