1
关于该链接提供了答案的问题:Proposed solution中的MSBuild定义WIX多DefineConstants - 与提出的解决方案
我试过多种方法可以使用这种方法,我无法得到它的工作。我仔细检查了我正在运行msbuild的框架4版本,并且仔细地按照说明操作。
我WixValues属性看起来像这样
<PropertyGroup>
<WixValues>
OnBuildServer=True;
DefineConstants=TXT=$(TXT);ProdVersion=$(InstallVersion);
Configuration=Release;
Platform=x64;
SuppressAllWarnings=True;
APPDATA=$(APPDATA);
</WixValues>
</PropertyGroup>
但不知何故,第二defineconstant价值没有得到命令行,即使所有其他值到达那里确定。
The candle command line from the msbuild log looks like this:
..\WixTools\candle.exe -sw -TXT=TRUE -d"DevEnvDir=*Undefined if not building from within Visual Studio*" -d"SolutionDir=*Undefined if not building a solution or within Visual Studio*" -d"SolutionExt=*Undefined if not building a solution or within Visual Studio*" -d"SolutionFileName=*Undefined if not building a solution or within Visual Studio*" -d"SolutionName=*Undefined if not building a solution or within Visual Studio*" -d"SolutionPath=*Undefined if not building a solution or within Visual Studio*" -dConfiguration=Release -dOutDir=bin\x64\Release\ -dPlatform=x64 -dProjectDir=C:\Builds\Viper06\InstallSE64wix\ -dProjectExt=.wixproj -dProjectFileName=InstallSE64wix.wixproj -dProjectName=InstallSE64wix -dProjectPath=C:\Builds\Viper06\InstallSE64wix\InstallSE64wix.wixproj -dTargetDir=C:\Builds\Viper06\InstallSE64wix\bin\x64\Release\ -dTargetExt=.msi -dTargetFileName=InstallSE64wix.msi -dTargetName=InstallSE64wix -dTargetPath=C:\Builds\Viper06\InstallSE64wix\bin\x64\Release\InstallSE64wix.msi -out obj
的MSBuild任务看起来像这样
<MSBuild
Projects="$(SvnWorkingCopy)\InstallSE64wix\InstallSE64wix.wixproj"
Targets="Rebuild"
Properties="$([MSBuild]::Unescape($(WixValues)))"
/>
这里的项目文件条目
<DefineConstants>$([MSBuild]::Unescape($(WixValues)))</DefineConstants>
任何帮助从罗里或别人谁得到了这个工作,将不胜感激。
感谢