admin管理员组

文章数量:1304098

When I create a Merge Module with WiX, the wixproj file has

 <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 build tools must be installed to build this project. To download the WiX Toolset, see .11/stable" />
  </Target>

at the end. I did an echo and this is what I get back

  WixTargetsPath: 
  MSBuildExtensionsPath32: C:\Program Files\dotnet\sdk\9.0.101
  WixTargetsImported: 

So I get The WiX Toolset v3.11 build tools must be installed to build this project. To download the WiX Toolset, see .11/stable, but I installed WiX 3.14 and the WiX v3 Visual Studio 2022 extension.

The errors only occur during dotnet-commands (clean, build, restore). But not when I do a Visual Studio Build/Rebuild Solution.

When I create a Merge Module with WiX, the wixproj file has

 <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 build tools must be installed to build this project. To download the WiX Toolset, see https://wixtoolset./releases/v3.11/stable" />
  </Target>

at the end. I did an echo and this is what I get back

  WixTargetsPath: 
  MSBuildExtensionsPath32: C:\Program Files\dotnet\sdk\9.0.101
  WixTargetsImported: 

So I get The WiX Toolset v3.11 build tools must be installed to build this project. To download the WiX Toolset, see https://wixtoolset./releases/v3.11/stable, but I installed WiX 3.14 and the WiX v3 Visual Studio 2022 extension.

The errors only occur during dotnet-commands (clean, build, restore). But not when I do a Visual Studio Build/Rebuild Solution.

Share Improve this question edited Feb 5 at 9:59 zhrgci asked Feb 4 at 10:11 zhrgcizhrgci 6863 gold badges10 silver badges36 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

WiX v3 does not support the modern build requirements of dotnet commands. WiX v3 was designed in 2009, well before any of that stuff was dreamed up. :)

You need to move to WiX v4+ and it's modern Sdk-style targets, which fully support dotnet build.

本文标签: