Adding HEAT output to the GAC

Adding HEAT output to the GAC

June 3, 2010 | Development

There are situations (infrastructure component used across the enterprise is one example) where it is more useful to put the assembly in to the GAC.

Using Heat, a transform needs to be used that will add the assembly=”.net” to the wixobj.

In the wixproj File, add a transforms line:


    <HeatProject Include=@(ProjectReference->’%(FullPath)’)>







The XSLT file contents:


<?xml version=1.0encoding=utf-8?>

<xsl:stylesheet version=1.0xmlns:xsl=  xmlns:msxsl=urn:schemas-microsoft-com:xsltexclude-result-prefixes=msxslxmlns:wix=>

  <xsl:output method=xmlindent=yes/>


  <!– Start the processing from the root copying–>

  <xsl:template match=wix:*|@*>


      <xsl:apply-templates select=text()|*|@* />




  <!– Search for elements that have a file source, and add an attribute that will let wix GAC them–>

  <xsl:template match=*[contains(@Source,’dll’)]>

    <xsl:element name=Filenamespace=>

      <xsl:attribute name=Id>

        <xsl:value-of select=@Id/>


      <xsl:attribute name =Source>

        <xsl:value-of select=@Source/>


      <xsl:attribute name=Assembly>.net</xsl:attribute>

      <xsl:attribute name=KeyPath>yes</xsl:attribute>





This will harvest all the output assemblies and flag them to be installed in to the GAC