janid1967

Hello again, new problem:

Our Outlook users have 2 VSTO add-ins, let us call them A and B here. Sometimes some users complains about that they miss their add-in B. (They don't see the buttons). When investigating their PC, I see that add-in A is Hard disabled (Shown as Disabled Items under Help -> About -> Disabled Items). When enabling add-in A again, restarting Outlook, add-in B (and A) load as normal again.

Question 1) Any ideas how this can happen How can loading of an add-in "disturb" for another

I've tried to provoke this situation, but can't. I sit on the source code on both add-ins, and have tried to perform a

throw new exception("Hard coded exception");

in both ThisApplication_Startup and ThisApplication_Shutdown of add-in A. The exception in ThisApplication_Startup was shown as a message, and the add-in got soft disablet (and didn't disturb add-in B) The exception in ThisApplication_Shutdown did nothing)

Question 2) Any ideas how I can provoke a hard disabling of an Add-in

Rgds

Jan Inge



Re: Visual Studio Tools for Office Outlook VSTO Addin: Hard disabled add-In A "block" for loading of add-in B

X4U

Hello Janid,

the reason for this can be an error while abusing an underlaying COM Object.

Your Hardcoded Exception comes from your .Net AppDomain - and therefor this shouldn't be a problem.

I beleive you have an unhandled exception on the unmanaged side wich causes your AddIn to get disabled.

The only thing what I would recommend here is to put try/catch blocks on every method in your addins and log your errors and programm flow to a logfile. This may help you to investigate your problem.

I have a small TraceAndLog sample here:

http://www.x4u.de/Programming/Outlook/Codesnippets/tabid/61/Default.aspx

Hope this helps,

greets, Helmut






Re: Visual Studio Tools for Office Outlook VSTO Addin: Hard disabled add-In A "block" for loading of add-in B

janid1967

Thx for replying my post again Helmut.

I think You don't understand my problem: The problem is not in fact that Add-In A become hard disabled. (And yes, we use try-catch AND logging)

The problem is that AFTER Add-in A has become hard-disabled, Add-in B don't load. Add-in B is neither soft disabled nor hard disablet at this moment.

I've managed to provoke this situation on my development PC now:

1) I uninstall all my Add-ins

2) I install Add-in B only (from MSI, using msiexec)

3) I start Outlook, verify that Add-in B load as normal.

4) Stop Outlook again

5) I start debugging add-in A through VS 2005

6) When Outlook (with add-in A) is running, I Stop debugging (i.e kill Outlook and Add-ins)

7) When starting Outlook outside VS, Outlook give message ala "The addin A didn't shutdown properly. Du You want to disable". I select Yes, and add-in A show under Help -> About -> Disabled Items (as wanted)

8) Add-In B don't load since Add-In A is hard disabled! This is the problem.

rgds

Jan Inge





Re: Visual Studio Tools for Office Outlook VSTO Addin: Hard disabled add-In A "block" for loading of add-in B

X4U

Hello Jan Inge,

now I understand (I hope).

1. Your AddIn get's Hard-Disabled for an unknown error - but that's not a problem.

2. -> Resume: When an VSTO SE AddIn is Hard-Disabled for some reason, all other VSTO SE AddIns are affected.

This is definitly an Issue for the VSTO Team.

I will try to reproduce and aknowledge. Then we have to wait if someone of the VSTO Team-Members will check it and see if they can help.

I will give it a try later.

Greets, Helmut.

P.S.

One of my AddIns get's Hard-Disabled would be definitly a problem for me.






Re: Visual Studio Tools for Office Outlook VSTO Addin: Hard disabled add-In A "block" for loading of add-in B

janid1967

Great, then I don't need to spend time to envestigate any more

Just for the record: You say "VSTO SE". My understanding is that VSTO was created for Office 2003, and VSTO SE (Second Edition) was created for Office 2007. Am I Right

We use Office 2003, and I guess our users use VSTO (not SE).

I guess that the problem we discuss is valid for both VSTO and VSTO SE. Agree

Rgds

Jan Inge