Versions

Excel 2007, Windows Vista, VB.NET, Visual Studio 2008 with .NET 3.5 sp2, MSI setup package.

What I am trying to do

I have an Excel UDF that is written in VB.NET. It is exposed as a COM Server because you cannot create Excel UDFs in .NET languages directly. Installation is a real pain because none of the installation settings seem to get it quite right; none of them gives you an installation package that puts the COM Server on the client machine with the server registered, the type library registered, and the component visible in the Excel 2007's list of Automation Servers.

What I've tried

Here are the installation settings for type libraries, with their defects apparent at compile-time and install-time:

vsdrfComSelfReg

  • no warning during the compilation of the setup project
  • Module xxx.tlb failed to register. HRESULT -2147024703
  • Component's ProgID and GUID are set in registry, but the component does not appear in the list of Automation Servers

vsdrfDoNotregister

  • no warning during compilation
  • installation works but of course the TLB is not registered

vsdrfCOM

  • Compile-time warning: WARNING: Unable to create registration information for file named 'xxx.tlb'
  • type library is not registered during installation

The correct setting should be vsdrfCOM, as explained here:

Q. Can anyone please tell what does vsdrfCOM mean in a setup project of Visual Studio? It is available when I check the property "Register" among properties of added files in a Setup project.

A. It means that Visual Studio will extract COM registration data at build time and put it in the MSI file (mostly the MSI file's reg

Edit
Report