How to deploy custom images (NGen) using Wix links and projects

I use Wix / Votive to build the installer for my .NET solution. I am including binaries from other projects (EXE and DLL) using project references (which I assume uses heat.exe).

Now I want to do to pre-complete all the builds with ngen.exeduring installation. According to Wix help, this can be done through WiX.NET decryption :

<Component Id="App.exe" Guid="PUT-GUID-HERE">
    <File Id="App.exe" Source="App.exe" KeyPath="yes">
        <netfx:NativeImage Id="ngen_App.exe" Platform="32bit" Priority="0" />
    </File>
</Component>

Now the problem is that the tags <File />are created using heat.exe, and I can’t figure out how to recommend either heat.exegenerating the tag <NativeImage />inside, or how to refer to the generated one <File />and add the tag <NativeImage />from the outside.

Right now, the only way I can see is not to use project links, but obviously I would like to keep them.

Any suggestions? Thank!

+3
source share
1 answer

Heat is not intended and does not support this story. Most people use Heat once to do most of the heavy lifting of creating WXS, and then save it as code from there. Some people like to turn this into a build process in order to become dynamic, but I am really against it for reasons that can be found even where you are interested.

, , , LINQ to XML ( XML DOM), , .NET, NativeImage. .

+3

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


All Articles