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>
任何幫助從羅裏或別人誰得到了這個工作,將不勝感激。
感謝