.net-corewixwindows-servicesheat

Wix Installer Heat.exe error Parameter "exePath" is invalid


I am building a self-contained .Net Core worker service which I run as a windows service. Now I want to create an installe using Wix, however when I try to harvest all the needed DLL's for installation I get the following error:

An error occurred loading a configuration file: The parameter 'exePath' is invalid.

I've read this post which states the heat.exe might be broken. But I downloaded the tools via NuGet (3.11.2) which should theoretically be fine. My Beforebuild target looks as following:

<Exec Command="dotnet publish ..\Parlando.PVS.PackingSlipService\Parlando.PVS.PackingSlipService.csproj -c $(Configuration) -r win10-x86" />
<ItemGroup>
  <LinkerBindInputPaths Include="%(ProjectReference.RootDir)%(ProjectReference.Directory)bin\$(Configuration)\%(ProjectReference.TargetFrameworkIdentifier)\win10-x86\publish" />
</ItemGroup>
<HeatDirectory 
DirectoryRefId="INSTALLFOLDER" 
OutputFile="$(ProjectDir)\HeatGeneratedFileList.wxs" 
Directory="..\Parlando.PVS.PackingSlipService\bin\Release\netcoreapp3.1\win10-x86\publish" 
ComponentGroupName="HeatGenerated" 
ToolPath="$(WixToolPath)" 
AutogenerateGuids="True" 
SuppressCom="True" 
SuppressRegistry="True" 
SuppressFragments="True" 
SuppressRootDirectory="True"
NoLogo="true"   />
<ItemGroup>
  <Compile Include="$(ProjectDir)\HeatGeneratedFileList.wxs" Condition="'%(ProjectReference.IsDotnetSDKProject)' == 'True'" />
</ItemGroup>

This should generate a .wxs file that I reference in the Product.wxs file when installing the service. My product.wxs does so as followed:

<ServiceInstall
      Id="ServiceInstaller"
      Type="ownProcess"
      Name="Parlando.PVS.PackingSlipService"
      DisplayName="Parlando.PVS.PackingSlipService"
      Description="Service installed by Parlando to create packingslips and invoices."
      Start="auto"
      Account="LocalSystem"
      ErrorControl="normal" />
    <ServiceControl
      Id="ServiceInstaller"
      Start="install"
      Stop="both"
      Remove="uninstall"
      Name="Parlando.PVS.PackingSlipService" />
  </Component>    
  <ComponentRef Id="HeatGenerated" />

How can i use the heat.exe in such a way that I can access the DLL list in my Product.wxs and install my service via MSI?


Solution

  • Apperantly this error has nothing to do with the provided settings for the Wix installer, but rather the machine that Wix is installed on.

    After testing my program on a different machine, all worked fine.