Reputation: 553
I have a Wix setup project that was recently converted from Wix 3 to Wix 4. I installed the HeatWave extension to perform the conversion and I'm able to build with it installed in Visual Studio 2022. However, my company uses nuget restore
and devenv
for builds. When the build runs without HeatWave, there's an error for the .wixproj
that says, "The application for the project is not installed" even though I have the WixToolset.Heat
in my .wixproj
as a package reference.
I read the Integrating WiX Projects Into Daily Builds article and that's what we were using previously with Wix 3, so I was hoping to achieve something similar with Wix 4 where the HeatWave extension doesn't have to be installed and everything can process using the NuGet packages. If I don't have the HeatWave extension installed, Visual Studio doesn't recognize the .wixproj
at all. Once I add it back, it appears to build just fine as long as it targets x86.
Is there a way to build Wix 4 using nuget restore
and devenv
?
Thanks!
Upvotes: 0
Views: 726
Reputation: 36006
It was not the goal that building .wixprojs
would require HeatWave to be installed. But I've not seen anyone actually using devenv
to do builds in CI/CD systems. That's such a heavyweight way to build .sln files.
Generally, CI/CD is expected to be running msbuild
or dotnet build
. Both of those can build a .sln file and all the project references in it.
So, I'd say you are in a situation we never tested when using WiX. I'm glad HeatWave happens to just work (because I know we didn't test it at FireGiant :smile:).
Upvotes: 1
Reputation: 2466
From my testing, you cannot build .wixproj
without HeatWave if you are using devenv
. However, nothing is stopping you from making the extension a .csproj
since it's SDK based now, which is what I personally do. WiX4 also allows you to build from the command line very easily with dotnet build
.
So your two courses of action:
Rename extension to .csproj
and use devenv
. Cons: You lose all HeatWave integration but this doesn't matter if you know what you're doing.
Use dotnet build
to build the SDK based project.
Upvotes: 0