关于此链接提供的答案:建议的解决方案
我试图以多种方式使用这种方法,但是我无法让它工作.我已经仔细检查过我正在运行msbuild的框架4版本,我是这样,并仔细按照说明操作.
我的WixValues属性看起来像这样
<PropertyGroup>
<WixValues>
OnBuildServer=True;
DefineConstants=TXT=$(TXT);ProdVersion=$(InstallVersion);
Configuration=Release;
Platform=x64;
SuppressAllWarnings=True;
APPDATA=$(APPDATA);
</WixValues>
</PropertyGroup>
Run Code Online (Sandbox Code Playgroud)
但不知何故,第二个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 …Run Code Online (Sandbox Code Playgroud)