Unable to run Outlook 2000 com addin built via .NET/VS 2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Background:

I have built a com addin designed for Outlook 2000 using VS version
7.1.3088 and .NET framework version 1.1.4322 SP1. The language used
is C#.

I used the "Shared Addin" wizard to create the addin and only
selected the Outlook option. The addin is designed to load when the
host app (Outlook) starts and be available to all users.

The dependencies are: Extensibility.dll, Interop.Office.dll,
Interop.Outlook.dll, MS09.dll, msoutl9.dll, Office.dll

I have 2 major problems:

1. When installed on the box where the addin was developed the addin is run
(when Outlook starts) from the build location not the install location. That
is if the build directory is c:\myproj\bin\Debug and the install directory is
c:\program files\outlook-addin\myproj then the addin is executed from the
build directory. The install goes ok and the correct registry entries are
created. I have tested to see where the addin is running from by checking
the value of Assembly.GetExecutingAssembly and it returns the build path.
Also, if I remove the myproj.dll file from the bin\Debug directory the addin
isn't started with Outlook.

2. The other issue (and I suspect it is related to 1) is that the addin
cannot be installed onto another machine running W2K and Outlook 2000.
Again, the install goes fine but nothing happens when Outlook is started.

Strangely, the addin used to work (i.e. could be installed on another W2K
machine and run in Outlook) but nothing has changed (in terms of the
configuration of the project) for it to behave this way.

Can anyone help? I don't even know where to start looking to resolve it.

Gary
 
Gary -

I've been working on a C# Outlook PlugIn for the past (too long to
say!).

It's installing and working on W2K and XP, Outlook 2000 - 2003. I had a
similiar problem, and found I had to modify the Install to include the
call to base.Install(stateSaver);

You can also download and install the "main function" source code for
the PlugIn from www.TekGuard.com.


public class AppInstaller : Installer
{
private System.ComponentModel.IContainer components;

public override void Install(System.Collections.IDictionary
stateSaver)
{
base.Install(stateSaver);

RegistrationServices regsrv = new RegistrationServices();
if (!regsrv.RegisterAssembly(this.GetType().Assembly,
AssemblyRegistrationFlags.SetCodeBase))
{
throw new InstallException("Failed To Register for COM");
}
}

public override void Uninstall(System.Collections.IDictionary
savedState)
{
base.Uninstall(savedState);

RegistrationServices regsrv = new RegistrationServices();
if (!regsrv.UnregisterAssembly(this.GetType().Assembly))
{
throw new InstallException("Failed To Unregister for COM");
}
}

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}




Posted by www.AndrewM.com [wwwAndrewMCom Post# 20050616]

Software Entrepreneurs, ISV's, Developers - Sell & Support your
programs with an 800# virtual auto-attendant:
www.VoiceInfo.com - <a href="http://www.VoiceInfo.com">
Virtual Office, Automated Phone Assistant, Web Access </a><br>

Developers, ISP's, Small Business Owners - Need a starting point for an
anti-spam email server, Outlook client, WebMail?
www.TekGuard.com - <a href="http://www.TekGuard.com">
Free Mail Server, Outlook PlugIn, WebMail, C# Source Code </a>
 
Back
Top