Reputation: 968
I've installed Wix Toolset 3.11.0.1528 and extension for VS 2015 0.9.17.13693
After pressing build
I get:
The WiX Toolset v4 build tools must be installed to build this project. To download WiX Toolset v4 visit ...
I don't get it. I have version 3.11 installed and it wants v4. I don't want to build anything from source.
What should I do to make it use available WiX version?
Upvotes: 1
Views: 3557
Reputation: 968
Ah. Ok. At VS project manager (or whatever they call it), when you add New project
, you have two almost identical choices:
So the first one uses <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" ...
And the second one: <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" ...
The second one fails. And just changing this url doesn't help.
Choose the first variant and just use it.
Upvotes: 5
Reputation: 368
Bit of a necro post but if anyone finds it helpful, well then, good.
Edit the XML as pointed out above by replacing the namespace from v4 to the v3 one.
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"/>
Then edit the proj file of your setup and remove the reference to the WIX target path.
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\WiX Toolset\v4\wix.targets</WixTargetsPath>
Finally, replace the import and target tags with the 3.11 version of the code.
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
Upvotes: 5