VB.net Outlook 2003 Add-in not loading - Not Loaded. A Runtime error occurred... How can i fix this????

Hi Experts,

I've written a vb.net outlook 2003 add-in in vs2008, but after i installed it on the client machine, it fails to load.
I can see the Add-in in outlook under COM Add-Ins, but it's not active and the error message that goes with it is:

Not loaded. A runtime error occurred during the loading of the COM Add-In.

I've read up SO much on articles suggesting that it's a CAS security problem, but i don't really know where or how to fix this?

Can anyone PLEASE assist me in this??? It's extremely urgent....

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Christopher KileCommented:
Well, first, you need to establish exactly what runtime error is occuring during the load.  Do you have try-catch logic in the add-in intialization (probably an event called OnLoad or OnInitialize) that will send reports of errors to the application error log?  That would be my first step.
Kobz46Author Commented:
Have you by any chance got sample code (vb.net) of a VERY basic outlook add-in that only displays a menu, and does something stupid like msgbox "hello" when you click on it?
Christopher KileCommented:
No, I do not.
Kobz46Author Commented:
Figured out what was going wrong...

Apparently Office 2003 and 2007 differs COMPLETELY!

My issue was the following:

For .net framework 2, and outlook 2003, i referenced the outlook.dll 2007 library instead of the 2003 one.
The second issue was that Visual Studio Tools For Office runtime ed needed to be installed for the add-in to work with 2003. This is not needed for 2007.

For anyone else struggling with this, here are a couple of links that made my life SO much easier:

Architecture of Application-Level Add-Ins

Deploying Application-Level Add-Ins (2003 System)

How to Prepare End User Computers to Run Office Solutions (2003 System)

Outlook Add-ins with Visual Studio Tools for Office

Registry Entries for Application-Level Add-Ins

4 things needed to make an Add-In work in outlook 2003:

- Must have the relevant .net framework installed on the client PC
- Must have VS tools for Office runtime installed on the client PC
- You need a basic set of registry keys entered
- You need to configure the CAS (code access security) for .net framework to your add-in permission to load / for the user to access it

This was a REAL pain for me but hope this post will help anyone in the future who needs help...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kobz46Author Commented:
see above comment for solution
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.