C# .NET Addin for Outlook 2003 registration problem

  • Thread starter Thread starter Sidd Goyal
  • Start date Start date
S

Sidd Goyal

I've created a shared AddIn for Outlook 2003 written in C# using
Visual Studio .NET. The AddIn is used to synchronize Outlook contact
information with an ODBC data source. I'm having a problem getting
the AddIn to load properly when I install when its Installer (I know
the AddIn is loaded when a button is displayed in the Outlook
toolbar). Specifically when I include a class in the AddIn that
references a class in a namespace outside of the "System" namespace
heirarchy the AddIn fails to load properly (i.e. the button does not
show up). I figure there is something wrong in the way I'm
referencing external DLLs when I build the project. Any ideas on how
to properly reference (and include) external DLLs in a shared AddIn
project would be greatly appreciated. Thanks.

Sidd Goyal
(e-mail address removed)
 
Hi,

Your addin runs in the Outlook's process, so its working folder is the
folder from which Outlook.exe was started. And it tries to find its
external assemblies in that folder.

You have 3 possibilities:
1. copy the .dlls in the outlook folder.
2. register these dlls in GAC
3. (I use this), capture AppDpmain.AssemblyResolve event and load the
assemblies from your own folder.

Hope that helps
Sunny
 
Back
Top