I wrote an add-in for Enterprise Architect. It's a COM Object. This add-in uses some other project dll's.
I created an installer which registers the Add-In's dll. This class is in the add-in's project, let's call it MyProject.dll.
/// <summary>
/// Installer class for Enterprise Architect Add-In
/// </summary>
[RunInstaller(true)]
public class ComInstaller : Installer
{
#region Public Methods
public override void Install( System.Collections.IDictionary stateSaver )
{
base.Install( stateSaver );
RegistrationServices regsrv = new RegistrationServices();
if ( !regsrv.RegisterAssembly( GetType().Assembly, AssemblyRegistrationFlags.SetCodeBase ) )
{
throw new InstallException( "Failed to register type library for COM" );
}
}
public override void Uninstall( System.Collections.IDictionary savedState )
{
base.Uninstall( savedState );
RegistrationServices regsrv = new RegistrationServices();
if ( !regsrv.UnregisterAssembly( GetType().Assembly ) )
{
throw new InstallException("Failed to unregister type library for COM");
}
}
#endregion
}
If the add-in runs, I can't build my solution because access is denied. The add-in uses the MyProject.dll which is in the Debug folder instead of the installed one.
How can I solve this?
Thanks, Maestro