Visio AddIn Installation Problem

S

shashi behari

Using C#, VS 2005 (December 2004 CTP) and Visio Pro 2003 (SP1).

After creating and building an Add-in, i can get it to run in a Visio
Instance without having to install it. This works fine until it encounters an
"unhandled" exception in the OnConnection method, the AddIn won't run as
normal even after removing the erroneous code, and i have to create a new
solution everytime it happens (this creates a new GUID for the Add-In, even
though the Process Name is the same)

Since the Add-in runs in a Visio instance, it is tricky to effectively debug
my code.

This could be a bug or "feature" (maybe Visio/Office will eternally block an
Add-in that may damage your pc) but has anyone here found a work-around /
fix for this ?
 
C

Chris Roth [ Visio MVP ]

Go to Help > About and click Disabled Items... You can reset the loading of
your errant add-on there. I have know idea why I know this : )

You might look into MS' "COM Add-in Shim Wizard" or whatever it's called.
This helps isolate .NET COM Add-ins from each other so one doesn't bring
them all down. (By default, they all run from mscore-something.dll, and one
bad apple can crash them all)

--

Hope this helps,

Chris Roth
Visio MVP
 
S

shashi behari

Thanks, ill have a look at the Shim Wizard. I've checked the disabled items
list and it never shows anything.. even when there's a problem with an add-in
, which is what throws me.
 
B

Brent Wherry

I had the same problem. I resolved it by putting a traceString into the
OnConnection (e g. traceString += "Point number ab;" and then placing the
OnConnection code inside a try block. The catch block just shows the
traceString in a MessageBox.

If Help/About/Enable disabled items doesn't do the trick, you can re-instate
the Add-In be running the Setup from the deployment project again.

Hope it helps

Brent Wherry
 

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