[wix-users] [Ext] Visual Studio Build Issue for Heat Command

Derek Wetherall DWetherall at slb.com
Tue Nov 26 00:56:33 PST 2019


I run the heat from a Pre-Build event in the visual studio solution creating a fragment with the -sfrag command. The resulting  fragment is included in my project. And referred to by a ComnponentGroupRef  in the product.wxs.
e.g.
"heat.exe" dir "$(ProjectDir)..\mydir" -cg BinDir -gg -g1 -scom -sreg -sfrag  -dr foo   -var "var.fooDir" -out "$(ProjectDir)Fragments\fooFragment.wxs" 

And

<Feature Id="MyFeature" Title="$(var.ProductName) " Level="300">
      <ComponentGroupRef Id="fooDir" />
    </Feature>



Schlumberger-Private

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Ven H via wix-users
Sent: 26 November 2019 06:35
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Ven H <venh.123 at gmail.com>
Subject: [Ext] [wix-users] Visual Studio Build Issue for Heat Command

Hi,

I have a WiX Setup Project in Visual Studio 2017. I have a requirement to run Heat command on a folder and include the generated wxs file into the project before starting to build (i.e., before running the Candle & Light commands). But, I am not sure how to achieve this. I tried different things and also searched on the internet. I am forced to run the build process twice. I have tweaked the .wixproj file to include the HeatDirectory task to run the heat command. But it makes me run the build twice. First, it runs the Heat command and generates the wxs. Then I have to manually include this wxs into the project and run the build again to generate the MSI correctly. Is there a better way to do this? Please advise. Also, I need to have a build task after build (not Post Build Event) to upload this MSI to a remote server.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.com/v3/__http://www.firegiant.com/__;!kI-RaYHuUlXHMWI!0oP1d-WjwdLCL6j5SilD2H36cisLNXMHaW3ah3Xdh1_tgw-Mu6aurkb1mdGGfA$ 



More information about the wix-users mailing list