none
MSI not correctly registering COM dll on upgrade

    Question

  • I have an installer built using vs2008. One of the files that the msi installs is a COM dll with the setting Register=vsdraCOM. The installer has the setting of RemovePreviousVersions=True.

    When I build and install this on the clients' machine using the msi(v1.0) all installs file, exe and dlls.

    I had to upgrade the files (exe and dlls) to v2.0 so I changed the assembly version and file version of all files and also changed the version of the installer.

    When I install this on the clients' machine where v1.0 was installed, all the files are updated. However, the COM dll is not properly registered. I get an activeX error when I run the app. To fix this all I need to do is run regAsm manually on the client's machine.

    If I install v2.0 where v1.0 was NOT installed, all files are updated and dlls are properly registered.

    What am I missing? Why is the upgrade not properly registering the upgraded dll?

    Tuesday, July 10, 2012 6:13 PM

Answers

  • The only reason I can think of is about custom actions in setup project. If you have custom actions in the installer, COM registration will fail while upgrade. See msdn article here.  Search keyword upgrade on this page.

    The workaround and solution is to avoid using custom action. And in setup project, do not import Primary output from sourse project, add assemblies explictly instead.  Also see this article.

    Hope this helps.

    Thanks.


    Forrest Guo | MSDN Community Support | Feedback to manager

    Monday, July 16, 2012 1:51 AM
    Moderator

All replies