We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

TheRocket
Posts: 45
Joined: Thu Jul 26, 2012 6:55 pm

GAC uninstallation of a dynamic version file

Hi,

The situation described was reproduced with advanced installer 12.8 downloaded today, and appears to have the same behavior as version 9.7.

We have build a very simple installer with 2 DLL's to be registered in the system.

Auto register file, Register .Net assembly for COM interoperability, Syncronisation : Buildtime.
In Assemblies, the 2 dll's are installed in Global Assembly cache, and attributes are all Sync, and Version value is synchronized with file assembly.

The Setup is packed with files next to it.

Lets says we build the setup with DLL's version 2015.1.1.1. The installation process successfully registers the files and assemblies. Uninstallation process is able to uninstall everything properly.
Lets say we change the DLL's version to 2016.1.1.1. We don't rebuild the installation logic, we use the same MSI, we just replace the files next to it. The installation process successfully registers the files and version 2016.1.1.1

At the un-installation process, the files are not removed from the GAC listing. They still shows as 2016.1.1.1.

If we do rebuild the setup, the files will be properly uninstalled. But then, If we provide version 2015.1.1.1 with it, it will install it, but not uninstall it.

I suspect the installation process properly reads the file version from the supplied file, but the uninstall process uses the version that was defined at build time in the MSI.

Is this supported? Would it be a bug, or we should look to dynamically register / de-register the DLL in the GAC? We would prefer not to have to rebuild the setup each time as the product and version may slightly change for each customer.

Thanks!!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: GAC uninstallation of a dynamic version file

Hello,

Your supposition is right. The DLL file version is stored in the MSI setup database and the regsitered DLL file will be properly unregistered from the system only if it is the same DLL file as the one registered in the MSI database.

Unfortunately, there is no workaround you can use and the only solution is to rebuild the setup project each time you need to deliver another application version.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”