GAC - build without embedding in MSI

I want the GAC to assemble already on the target machines, I know where this assembly is located on each machine (you can assume that this path is static for all target machines and will not change and that I am the owner of this assembly) I do not want to include the assembly at GAC'd at MSI, because it can change every time you deploy a solution, and we don’t want our configuration to be changed every time. I tried using a tag <File>with Assembly = ". Net"

<File 
    Id="Assembly.dll"
    Name="Assembly.dll"
    Assembly=".net" 
    Source="Assembly.dll"
    KeyPath="yes" >
 </File>

but using a file inserts my assembly into MSI. Any ideas on how to simply tell MSI to just look for the assembly in a specific place and not include it?

+3
source share
2 answers

This is not supported by Windows Installer. It’s not immediately clear why you want to take someone else’s file and put it in the GAC (if it was your file, why not put it in the GAC for a start?). :)

0
source

It sounds like an odd request, but the way to do this is to write the script / batch file to the GAC file. Try it yourself without MSI. After working, include the script in MSI, and then execute the script as a custom action to execute during installation. You will also want to remove it from the GAC when uninstalling.

If you are using a Visual Studio installation project, right-click on the project and choose View> Custom Actions. From there, it will allow you to add actions for the relevant events (install, uninstall, etc.).

0

Source: https://habr.com/ru/post/1751030/


All Articles