0

My solution has 2 projects:

  1. A .NET 6 project
  2. A Wix Project to build an installer.

When I build the solution in Visual Studio, it works and my msi is generated. However when I try the same with the command:

 dotnet build 'foo.sln'

I get the following error:

error : The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, se e http://wixtoolset.org/releases/

I tried setting the WixTargetsPath in my .wixproj to the absolute path of the Wix bin folder but still no luck. Any idea why is it so?

brunofer42
  • 33
  • 4
  • Looks like you also need WiX Toolset build tools, and this answer https://stackoverflow.com/questions/47555006/the-wix-toolset-v3-11-or-newer-build-tools-must-be-installed-to-build-this-pro suggests you make sure to reboot after installing everything. – Anthony G. Nov 03 '22 at 22:00
  • Restarting the machine does not solve it. I have it installed since I few weeks now. Also I am using the WixTool set and not the Visual Studio extension. – brunofer42 Nov 03 '22 at 22:06

1 Answers1

1

WiX v3 doesn't support "core" MSBuild. Use "Framework" MSBuild instead. WiX v4 (coming to preview soon) is built on .NET 6 and dotnet build works.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47