progeo
Posts: 2
Joined: Tue Jul 17, 2018 2:29 pm

NGEN uninstall

Tue Jul 17, 2018 2:47 pm

Hi,
I created an installer project that puts some assemblies in GAC and then NGEN them to create native images.

Everything works perfectly, but when I uninstall the software the native images are uninstalled too.

The assemblies that I put in the GAC and got NGENed are used by different applications, so I would like to keep the native images also in case of uninstallation of a single app.

Actually the assemblies in GAC are not uninstalled, because they are referenced by other apps.

Is there any option to disable the native image uninstallation if the GAC assemblies are not removed?


Thanks

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: NGEN uninstall

Mon Jul 23, 2018 11:39 am

Hi and welcome to Advanced Installer forums.

I apologize for the delayed reply.

Indeed, if an assembly is kept in use by any application during the uninstallation of a package that installed it, that assembly will not be uninstalled. However, its related component from that package will be uninstalled and the native image will be removed, too.

If you have an assembly file added to more packages, you can can use the same GUID for its related components from all the packages, so it and its native image will not be uninstalled from the machine if any of those packages is still installed.

You can also achieve this by creating a merge module containing all the assembly, then use that merge module in your packages.

Let me know if you have other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

progeo
Posts: 2
Joined: Tue Jul 17, 2018 2:29 pm

Re: NGEN uninstall

Mon Jul 23, 2018 1:43 pm

Hi Eusebiu,
thanks for your response.

I will try your approach!

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: NGEN uninstall

Wed Jul 25, 2018 7:22 am

You're welcome.

Just let me know if you encounter any problems.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”