问题
i'm on Visual Studio 2012 and i use wix
I wanted to use a WixVariables or a DefineConstants on Target After build (wixproj) when i unload the project
i used on
<DefineConstants>VersionNodeServer=0.0.1;</DefineConstants>
Or
<WixVariables>VersionNodeServer=0.0.1;</WixVariables>
but when i used this variable 'VersionNodeServer' like that
<Target Name="AfterBuild">
<WebDownload FileName="test.msm" FileUri="$(VersionNodeServer)"/>
the build failed because FileUri is empty.
i saw my variable on the VS console ..
C:\Program Files\WiX Toolset v3.10\bin\candle.exe -dDebug -dVersionNodeServer=0.0.1;[...]
回答1:
Neither <DefineConstants>
nor <WixVariable>
define a variable for MSBUILD. You have to put
<PropertyGroup>
<VersionNodeServer>0.1.1</VersionNodeServer>
</PropertyGroup>
somewhere in your .wixproj file.
来源:https://stackoverflow.com/questions/39508002/wix-use-wixvariables-on-wixproj