2017-04-07 102 views
1

我已經安裝了維克斯工具箱3.11.0.1528和擴展VS 2015年0.9.17.13693如何構建wix工具集項目?

build後我得到:

的WiX的工具集V4構建工具必須安裝來構建這個項目。要下載WiX Toolset v4訪問...

我不明白。我安裝了3.11版本,它希望v4。我不想從源頭上構建任何東西。

我應該怎麼做才能使用可用的WiX版本?

回答

3

啊。好。在VS的項目經理(或不管他們叫它),當您添加New project,你有兩個幾乎相同的選擇:

  • 安裝項目 - 一期工程來回創造 - 一種用於創建MSI文件
  • 安裝工程項目基於XML的WiX MSI文件

所以第一個使用<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" ...

,第二個:<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" ...

第二個失敗。只是改變這個網址並沒有幫助。

選擇第一個變體並使用它。

2

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

最後,用3.11版本的代碼替換import和target標記。

<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> 
相關問題