I am collecting my project files using Heat . but since I want to have shortcuts on the target system, the main executable must be ignored Heat and manually added to the main wxs file . I use the following xsl file to report heat, to ignore my executable file (Aparati.exe)
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
<xsl:template match="@*|*">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:output method="xml" indent="yes" />
<xsl:key name="exe-search" match="wix:Component[contains(wix:File/@Source, 'Aparati.exe')]" use="@Id" />
<xsl:template match="wix:Component[key('exe-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('exe-search', @Id)]" />
</xsl:stylesheet>
The problem is that I don’t want to write the file name right here, instead I want to set the executable file name as an argument (possibly a wix variable) in the MSbuild file. I would be very grateful if anyone could tell me how this is possible. And what other approaches can I take to solve this problem.