Why won't my Setup Project Perform my Custom Registration Process
Posted
by Jordan S
on Stack Overflow
See other posts from Stack Overflow
or by Jordan S
Published on 2010-01-27T23:06:17Z
Indexed on
2010/05/22
0:00 UTC
Read the original article
Hit count: 217
I am trying to write an Setup Project/Installer for a class library driver that I wrote in C# using Visual Studio 2008. The driver project has a section of code that looks like this...
[ComRegisterFunction]
public static void RegisterASCOM(Type t)
{
Trace.WriteLine("Registration Started.");
DoRegistration(true);
}
In the driver project Properties -> "Assembly Information" I have set checked the box that says Make COM-Visible = true.
I added a Setup Project to the solution in VS, added the output dll from the driver project so that it installs on the target machine and set the Register property of the dll to "vsdraCOM". So, my understanding is that when the installer runs it SHOULD execute the methods of the dll that are marked with [COMRegisterFunction].
Using SysInternals Debug View I can monitor when the above code snippet is hit by watching for the "Registration started" text to show up in the window. When I build the solution, I can see the text show up so I know the driver is registering properly. The problem is that when I run the installer, I don't think it is doing the registration bit. I see nothing show up in Debug View. And if i try to access my driver via another application I get an error saying it "Cannot create ActiveX object". Why does the registration not occur during the install process?
The driver does register for COM but it does NOT call my custom registration method.
Does anyone have and suggestions of what I could be missing? Is there another way I can debug this?
(I can provide more code if anyone want's to take a look!!)
© Stack Overflow or respective owner