How to reference GAC'd DLLs in a Wix configuration project?

We have several third-party controls that are GAC'd on development machines. They are mentioned in Visual Studio projects. When we used VS configuration projects, he knew how to find the referenced files and include them in MSI. However, I cannot figure out how to include DLL file links from GAc in our new WIX setup. What do I put as a source?

<File Id="MyFile" Name="MyFile" Source="WHAT TO PUT HERE?" DiskId="1" Vital="yes" KeyPath="no"/>

Also a bonus question: how to automatically collect them using heat or other methods?

+4
source share
2 answers

A short answer to both: you cannot, and you should not anyway. You must test your tools in your source code management system and download it from your installers from verification. This way you control the versions you distribute, instead of building arbitrary versions from the GAC.

Note. DiskId and Vital default to the values ​​you give, so you can save some typifications by simply omitting them.

+6
source

Unfortunately, there is a known bug in Heat> that prevents it from copying reference assemblies when building a project.

By throwing away this problem and taking into account @Bob Arnson's answer to this question, you can set the CopyLocal attribute for reference assemblies so that they are copied from the GAC to the project output directory at build time. Then you can use the Heat directory assembly (as opposed to a project failure with an error) to include them in the assembly.

+1
source

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


All Articles