title: Why won't my Setup Project Perform my Custom Registration Process
body: <p>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...</p>
  
  <pre><code>    [ComRegisterFunction]
      public static void RegisterASCOM(Type t)
      {
          Trace.WriteLine("Registration Started.");
          DoRegistration(true);  
      }
  </code></pre>
  
  <p>In the driver project Properties -> "Assembly Information" I have set checked the box that says Make COM-Visible = true.</p>
  
  <p>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].</p>
  
  <p>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?</p>
  
  <p><strong>The driver does register for COM but it does NOT call my custom registration method.</strong></p>
  
  <p>Does anyone have and suggestions of what I could be missing? Is there another way I can debug this?</p>
  
  <p>(I can provide more code if anyone want's to take a look!!)</p>