Where is Wix.targets?

I had a setup where I could use Wix through msbuild, something which requires importing Wix.targets. However it has stopped working. I am using windows-2019 runner and I’m seeing this error:


D:\a\Snittlistan\Snittlistan\build.build(16,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\WiX\v3.x\Wix.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\WiX\v3.x\Wix.targets" is correct, and that the file exists on disk.

The relevant part of my msbuild script is this:

 <PropertyGroup>
    <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
…

Where has the file gone?

Oooohhh… I thought it happens only to me… yes - I can confirm wix.targets files is gone… :frowning:

Actual error that I get:

error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\WiX\v3.x\Wix.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\WiX\v3.x\Wix.targets" is correct, and that the file exists on disk.

It seems that Windows runner does not install Wix Extension any more into Visual Studio :frowning:

Trying to test suggestion from here: WiX toolset does not install targets into Microsoft Build Tools 2017 folder · Issue #5804 · wixtoolset/issues · GitHub

Are you able to apply the suggestion?

This solved my issue: