Visual studio 如何构建wix工具集项目?

Visual studio 如何构建wix工具集项目?,visual-studio,wix,Visual Studio,Wix,我已经为VS 2015 0.9.17.13693安装了Wix工具集3.11.0.1528和扩展 按下build后,我得到: 必须安装WiX工具集v4生成工具才能生成此项目。要下载WiX工具集v4,请访问 我不明白。我已经安装了3.11版,它需要v4。我不想从源代码构建任何东西 我应该怎么做才能使用WiX版本?啊。好啊在VS project manager(或任何他们称之为VS project manager)中,当您添加新项目时,您有两个几乎相同的选择: 安装项目-用于创建MSI文件的项目 安

我已经为VS 2015 0.9.17.13693安装了Wix工具集3.11.0.1528和扩展

按下
build
后,我得到:

必须安装WiX工具集v4生成工具才能生成此项目。要下载WiX工具集v4,请访问

我不明白。我已经安装了3.11版,它需要v4。我不想从源代码构建任何东西


我应该怎么做才能使用WiX版本?

啊。好啊在VS project manager(或任何他们称之为VS project manager)中,当您添加新项目时,您有两个几乎相同的选择:

  • 安装项目-用于创建MSI文件的项目
  • 安装项目-用于创建基于WiX的XML MSI文件的项目

所以第一个使用
啊。好啊在VS project manager(或任何他们称之为VS project manager)中,当您添加新项目时,您有两个几乎相同的选择:

  • 安装项目-用于创建MSI文件的项目
  • 安装项目-用于创建基于WiX的XML MSI文件的项目

因此,第一篇文章使用了necro帖子的
部分,但如果有人觉得它有用,那就好了

如上所述,通过将名称空间从v4替换为v3来编辑XML

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"/>

然后编辑设置的proj文件并删除对WIX目标路径的引用

<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\WiX Toolset\v4\wix.targets</WixTargetsPath>
$(MSBuildExtensionsPath)\WiX工具集\v4\WiX.targets
最后,用3.11版本的代码替换导入和目标标记

    <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>

有点像necro帖子,但如果有人觉得它有用,那就好了

如上所述,通过将名称空间从v4替换为v3来编辑XML

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"/>

然后编辑设置的proj文件并删除对WIX目标路径的引用

<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\WiX Toolset\v4\wix.targets</WixTargetsPath>
$(MSBuildExtensionsPath)\WiX工具集\v4\WiX.targets
最后,用3.11版本的代码替换导入和目标标记

    <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>


Necro?大概提供有用信息的肯定感谢您深入了解这些差异。Necro?大概提供有用信息的肯定感谢您深入了解这些差异。