Outlook plugin does not load


 I have VS with the latest updates with:

1. visual studio tools for office SE
2. visual studio tools for office SE runtime
3. VSTOR.exe
3. WinXP SP2
4. Office 2003

 I'm developing a 2003 add-in for Outlook and everything is working fine in my dev machine, I included SetSecurity.cs in my code and it works fine in my machine, however it never installs in other machines.

 tests were made on a XP SP2 machine with an Office2003 and .NET framework 2.0 installed, and I'm getting the error:

Not Loaded, a runtime error occurred during loading of the Com add-in

I've noticed that CAS is set as FullTrust on URL set to the correct installation folder with a wild card (*), under Machine Code group, however I tried to change the group to User but it did not work.

 Note that primary output for SetSecurity project is added to the setup project, and it is set as a custom action in install and uninstall.

 It happened once that it did not work in my dev machine, but when I added SetSecurity project it worked with no troubles, but the error was not the one mentioned above, it was something else that I could not remember!

 I could not find any post that really have the right cure for this, and i hope that someone got a solution for it!
Who is Participating?
Hi. I mentioned that i never developed using VSTO. Maybe you should look to system event log to know what happens. Also are you shure your plugin is registered normally?

http://msdn2.microsoft.com/en-us/library/bb332052.aspx - this is tutorial how to deploy your plugin and vsto prerequisites, i suppose you have read this already. That all i can do for you, i have no experience with VSTO, you should wait maybe another expert know something about issues you have.

Also here an sample http://www.microsoft.com/downloads/details.aspx?familyid=6991e869-8d5b-45f4-91e7-b527bd236f4c&displaylang=en

And here http://msdn2.microsoft.com/en-us/library/aa537182(office.11).aspx
An2 important part http://msdn2.microsoft.com/en-us/library/aa537182(office.11).aspx#office_vstooutlookadd-inarchitecture_registryentries
I have no cure for this, and have not worked with VSTO, but i worked with plugins writen my own without vsto. Did you tried to install VSTO on that mashine by your own hands? Maybe some of native VSTO dll is missed? Is your plugin setup have VSTO as prerequisite?

I know - plugins must be registered in registry, but when using VSTO there must be special things to do. VSTO must act like loader for your plugin and there must be registry-key value for it (vsto must register self as plugin, and then it must load your plugin regarding of vsto plugin registering rules).

Also. Maybe you can find *.pdb files of VSTO and debug Outlook to know what happened?

Also. When i worked on my own plugin i was stack with issue. .NET 2.0 assemblies can't be loaded from Office 2003 unless you install this "office2003-kb907417sfxcab-ENU.exe", i don't remember where i downloaded that package, you must search it.

I hope this can help.

creepy42Author Commented:
Hi Wizrr,

 Thanks for the reply. I tried the following:
1. installed office2003-kb907417sfxcab-ENU.exe on the test machine
2. installed lockbackRegKey.msi on the test machine.
3. installed extensibilityMSM.msi on the test machine.
4. I tried to regasm.exe to register the pia on the test machine

Nothing worked tho. do you know any way to debug this error?

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

creepy42Author Commented:
Hi again,

forgot to mention that the test machine is Win Vista with all the updates on from windows updates.
one more thing, that is when I installed office2003-kb907417sfxcab-ENU.exe and installed the plug-in outlook ran and I could see that the plugin loaded but I cannot see it working, I tried to disable it and enable it again and it kepts saying plugin loaded as start up then I restarted outlook and I got the same old error again.

 I wish anyone can help me out!
creepy42Author Commented:
Hello again,


 I installed VSTO2005SE in the client machine, and I tried an outlook add-in created in a VSTO with SetSecurity primary output added as a custom action in the install and uninstall.


 I have tried




and runing outlook from the command, but there was no pop-ups or errors, but surprisingly, I found the Load behavior is Loaded at startup, and of course I got very happy, and I went looking for my add-in and I did not find it!!!


 I tried to restart, restart outlook and enable-disable the plug-in from the COM manager, and the status is still Loaded at startup but I cannot find my plug-in anywhere, I right-clicked on the command bar area and I did not find my command bar either, however I could get it to run perfectly on my dev machine!



 Please help!




creepy42Author Commented:

 Thank you very much for the effort, I followed the document http://msdn2.microsoft.com/en-us/library/bb332052.aspx and I got stuck where it says that:
// text from the web page
To add the prerequisites
In Solution Explorer, right-click OutlookAddinSetup, and then click Properties.
In the Property Pages dialog box, click Prerequisites.
In the list of prerequisites, select the following items:
Microsoft Office 2003 Primary Interop Assemblies
2007 Microsoft Office Primary Interop Assemblies
Microsoft Visual Studio 2005 Tools for Office SE Runtime
Select Microsoft Visual Studio 2005 Tools for Office Runtime Language Pack if any users run your solutions with nonEnglish settings for Windows. These users must have the Visual Studio 2005 Tools for Office Language Pack to see runtime messages in the same language as Windows.
// end of text

When I click prerequisits, I don't see the above items, however I'm so sure that they are installed in my machine. So I moved on without choosing items from the prereqs. and when I built the progect I took the whole Debug folder in the test machine and this time it showed me "Visual Studio 2005 tools for office SE runtime is not installed" and at the same time I made sure that vstor.exe is installed in that machine.

 What is going wrong? I really appreciate some help here! and thanks in advance!

creepy42Author Commented:
The problem was solved and I'm very sorry that it was very silly and not something that others could learn from! the problem is that I used a text writer only for testing purposes like:

private TextWriter tw = new TextWriter("c:\Development\events.txt");

And I forgot all about it, and when I try to deploy to a test machine I get a run time error because there is no such path in the other PCs!

Anyway, thanks for wizrr for his efforts in trying to help me out!

Thank you). And good luck.
Hm. And don't forget about logs. Always use logs. See NLog in google).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.