Components WinX Heat.exe Win64 - Win64 = "yes"

I am currently building an installer that targets only 64-bit machines. Part of the process involves running Heat.exe to create Fragment elements that contain part of the deployed application.

The problem is that heat-generated components cause ICE: 80 errors, which are WiX, complaining that components targeting 32-bit systems and my installer are trying to load them into:

 <Directory Id="ProgramFiles64Folder"> 

The documentation has a -platform switch that can be used to -platform Heat that we are targeting an x64 environment, but there is no information in the documentation on how to use this switch. I tried:

 -platform=x64 -platform=Win64 

Nothing seems to affect the result to set the Win64 attribute for the generated components. Has anyone figured this out? Or am I completely barking on the wrong tree?

If I manually edited the assembled components to add Win64="yes" , the ICE error will disappear.

In my <Product> element, I have Platform="x64" , as I understand that it should accept this candle and understand that the components should be installed on x64 by default, but this does not work, it seems.

Vaguely.

+7
windows-installer wix
source share
2 answers

There will be an XSLT file. Save it, for example. HeatTransform.xslt :

 <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi" xmlns="http://schemas.microsoft.com/wix/2006/wi" exclude-result-prefixes="wix"> <xsl:output method="xml" encoding="UTF-8" indent="yes" /> <xsl:template match="wix:Wix"> <xsl:copy> <!-- The following enters the directive for adding the config.wxi include file to the dynamically generated file --> <!--xsl:processing-instruction name="include">$(sys.CURRENTDIR)wix\config.wxi</xsl:processing-instruction--> <xsl:apply-templates select="@*" /> <xsl:apply-templates /> </xsl:copy> </xsl:template> <!-- ### Adding the Win64-attribute to all Components --> <xsl:template match="wix:Component"> <xsl:copy> <xsl:apply-templates select="@*" /> <!-- Adding the Win64-attribute as we have a x64 application --> <xsl:attribute name="Win64">yes</xsl:attribute> <!-- Now take the rest of the inner tag --> <xsl:apply-templates select="node()" /> </xsl:copy> </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()" /> </xsl:copy> </xsl:template> </xsl:stylesheet> 

Then, in your heat command, add the -t <PathToYourFile>\HeatTransform.xslt . This will add the Win64 attribute to each component. In addition, I have the Platform='x64' attribute in my WiX source files and added the -arch x64 parameter to the candle call, as you already described in your question.

+9
source share

I also had this problem. Below is what I did, and it helped.

one)

Open the .wixproj file in notepad and manually change Condition-s in PropertyGroup-s as " x64 " instead of "x86":

 <Platform Condition=" '$(Platform)' == '' ">x64</Platform> ... <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> ... <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> ... 

2)

Go to Configuration Manager for the solution and verify that x64 is selected as the platform for the Wix project.

Although Heat still generates component nodes without Win64 = yes, it builds normally and installs in C: \ Program Files!

+6
source share

All Articles