0

I have created a wix sharp setup project and it works well. msi is created as desired.

Unfortunately, wix (sharp?) creates a folder called 'wix' in the project and places an autogenerated file in it. I really don't like that. Is there a way to avoid this modification of my source files?

It's possible to remove file again in csproj by adding the 'remove' line. I should however prefer not to have it soiling my source code, so I'm still looking for a better solution!

  <ItemGroup>
  ...
    <None Include="wix\$(ProjectName).g.wxs" />
    <None Remove="wix\$(ProjectName).g.wxs" />
  </ItemGroup>



<Reference Include="WixSharp, Version=1.11.0.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2, processorArchitecture=MSIL">
  <HintPath>..\packages\WixSharp.bin.1.11.0\lib\WixSharp.dll</HintPath>
</Reference>
<Reference Include="WixSharp.Msi, Version=1.11.0.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2, processorArchitecture=MSIL">
  <HintPath>..\packages\WixSharp.bin.1.11.0\lib\WixSharp.Msi.dll</HintPath>
</Reference>
<Reference Include="WixSharp.UI, Version=1.11.0.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2, processorArchitecture=MSIL">
  <HintPath>..\packages\WixSharp.bin.1.11.0\lib\WixSharp.UI.dll</HintPath>
</Reference>

BR, Anders

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
Anders Juul
  • 2,407
  • 3
  • 34
  • 56

1 Answers1

0

The answer (for me) was to use nuget wixsharp.bin instead of wixsharp as per (primary wixsharp developer) Oleg Shilo's response here:

https://github.com/oleg-shilo/wixsharp/issues/661

Oleg wrote (in case the link is lost in the malmstroem of the internet):

oleg-shilo commented [2019-08-11]

Yes it is possible. Instead of WixSharp NuGet package use WixSharp.bin. It will not modify the project. Though then building the project will simply compile the builder console application {ProjectName}.exe. And you will need to execute this app from your project post-build event.

The rest is the same.

Anders Juul
  • 2,407
  • 3
  • 34
  • 56