Wix - 在 .wixproj 上使用 WixVariables [英] Wix - Use WixVariables on .wixproj
问题描述
我在 Visual Studio 2012 上使用 wix
i'm on Visual Studio 2012 and i use wix
当我卸载项目时,我想在构建后(wixproj)在目标上使用 WixVariables 或 DefineConstants
I wanted to use a WixVariables or a DefineConstants on Target After build (wixproj) when i unload the project
我用过
<DefineConstants>VersionNodeServer=0.0.1;</DefineConstants>
或
<WixVariables>VersionNodeServer=0.0.1;</WixVariables>
但是当我像那样使用这个变量VersionNodeServer"时
but when i used this variable 'VersionNodeServer' like that
<Target Name="AfterBuild">
<WebDownload FileName="test.msm" FileUri="$(VersionNodeServer)"/>
构建失败,因为 FileUri 为空.
the build failed because FileUri is empty.
我在 VS 控制台上看到了我的变量 ..
i saw my variable on the VS console ..
C:\Program Files\WiX Toolset v3.10\bin\candle.exe -dDebug-dVersionNodeServer=0.0.1;[...]
C:\Program Files\WiX Toolset v3.10\bin\candle.exe -dDebug -dVersionNodeServer=0.0.1;[...]
推荐答案
和
都没有为 MSBUILD 定义变量.你必须把
Neither <DefineConstants>
nor <WixVariable>
define a variable for MSBUILD. You have to put
<PropertyGroup>
<VersionNodeServer>0.1.1</VersionNodeServer>
</PropertyGroup>
.wixproj 文件中的某个位置.
somewhere in your .wixproj file.
这篇关于Wix - 在 .wixproj 上使用 WixVariables的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!