title: Why is heat causing my Windows Service to not be added to windows registry/windows services
body: <p>Is there any reason that Heat would be causing my windows service to not be added to the registry? I am going through two different commits in my branch and the only difference between the two commits is that the latest one has heat to include dlls from the project that Wix is referencing.</p>
  
  <p>I've looked through the logs using msiexec and /l*v but there isn't anything about the service in there for some reason.</p>
  
  <p>Sorry about the xxx in some of the context of the code as I must remove some of the keywords for security purposes. This is my first time dealing with heat so I am unfamiliar with it and after googling questions about heat I have come to realize that the docs aren't very helpful either.</p>
  
  <h2>Product</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- The name of the product --&gt;
  &lt;?define Name = "xxx xxx Agent" ?&gt;
  &lt;!-- The manufacturer, for setup package publisher and folder info --&gt;
  &lt;?define Manufacturer = "xxx" ?&gt;
  &lt;!-- The version number of this setup package--&gt;
  &lt;?define Version = "1.0.0" ?&gt;
  &lt;!-- UpgradeCode must be unique and not changed once the first version of the program is installed. --&gt;
  &lt;?define UpgradeCode = "{145ED92C-BA1B-4257-8791-2337A012EEE7}" ?&gt;
  &lt;?if $(var.Platform) = x64?&gt;
  &lt;?define bitness = "(64 bit)"?&gt;
  &lt;?define Win64 = "yes"?&gt;
  &lt;?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?&gt;
  &lt;?else ?&gt;
  &lt;?define bitness = "(32 bit)"?&gt;
  &lt;?define Win64 = "no"?&gt;
  &lt;?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?&gt;
  &lt;?endif ?&gt;
  
  
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
      &lt;Product Id="*" Name="$(var.Name) $(var.bitness)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)" Version="$(var.Version)" Language="1033"&gt;
          &lt;Package InstallerVersion="300" Compressed="yes"/&gt;
          &lt;Media Id="1" Cabinet="xxx.xxx.Agent.WindowsService.cab" EmbedCab="yes" /&gt;
          &lt;MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." /&gt;
          &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
              &lt;Directory Id="$(var.PlatformProgramFilesFolder)"&gt;
                  &lt;Directory Id="ROOTDIRECTORY" Name="$(var.Manufacturer)"&gt;
                      &lt;Directory Id="INSTALLFOLDER" Name="$(var.Name)" /&gt;
                  &lt;/Directory&gt;
              &lt;/Directory&gt;
          &lt;/Directory&gt;
          &lt;DirectoryRef Id="INSTALLFOLDER"&gt;
              &lt;Component Id="$(var.xxx.xxx.Agent.WindowsService.TargetFileName)" Win64="$(var.Win64)" Guid="FD94EF3C-4A0B-4102-AF1E-2A489B4DB7DF"&gt;
                  &lt;RemoveFile Id="ALLFILES" Name="*.*" On="both" /&gt;
                  &lt;ServiceInstall Id="ServiceInstaller"
                                  Type="ownProcess"
                                  Name="xxx.xxx.Agent.WindowsService"
                                  Account="LocalSystem"
                                  DisplayName="$(var.Name)"
                                  Description="Deployment agent for xxx xxx"
                                  Start="auto"
                                  Interactive="yes"
                                  Vital="yes"
                                  ErrorControl="critical"
                                  Arguments="/start xxx.xxx.Agent.WindowsService"/&gt;
                  &lt;ServiceControl Id="ServiceUninstaller"
                                  Name="xxx.xxx.Agent.WindowsService"
                                  Stop="uninstall"
                                  Remove="uninstall"
                                  Wait="yes" /&gt;-
              &lt;/Component&gt;
          &lt;/DirectoryRef&gt;
          &lt;Feature Id="MainApplication" Title="Main Application" Level="1"&gt;
              &lt;ComponentRef Id="$(var.xxx.xxx.Agent.WindowsService.TargetFileName)" /&gt;
              &lt;ComponentGroupRef Id="HeatGenerated"/&gt;
          &lt;/Feature&gt;
      &lt;/Product&gt;
  &lt;/Wix&gt;
  </code></pre>
  
  <h2>Filter</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"&gt;
      &lt;xsl:output method="xml" indent="yes" /&gt;
      &lt;xsl:template match="@*|node()"&gt;
          &lt;xsl:copy&gt;
              &lt;xsl:apply-templates select="@*|node()"/&gt;
          &lt;/xsl:copy&gt;
      &lt;/xsl:template&gt;
      &lt;xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.pdb')]" use="@Id" /&gt;
      &lt;xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.xml')]" use="@Id" /&gt;
      &lt;xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.dll.config')]" use="@Id" /&gt;
      &lt;xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.exe')]" use="@Id" /&gt;
      &lt;xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'app.config')]" use="@Id" /&gt;
      &lt;xsl:key name="service-search" match="wix:Component[wix:File/@Source = '$(var.xxx.xxx.xxx.WindowsService.TargetDir)\xxx.xxx.xxx.WindowsService.exe']" use="@Id" /&gt;
      &lt;xsl:template match="wix:Component[key('service-search', @Id)]" /&gt;
      &lt;xsl:template match="wix:ComponentRef[key('service-search', @Id)]" /&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>