2011-04-01 2 views
1

와 문제 : Proposed solutionWIX 여러 DefineConstants - 링크에서 제공하는 대답과 관련하여 제안 된 솔루션

가 나는 여러 가지 방법으로이 방법을 사용하려하고 나는 그것이 작동하도록 할 수 없습니다. 나는 msbuild의 프레임 워크 4 버전을 실행 중이라는 것을 두 번 확인했습니다. 나는이 것을주의 깊게 따라갔습니다.

내 WixValues ​​속성은이

<PropertyGroup> 
    <WixValues> 
     OnBuildServer=True; 
     DefineConstants=TXT=$(TXT);ProdVersion=$(InstallVersion); 
     Configuration=Release; 
     Platform=x64; 
     SuppressAllWarnings=True; 
     APPDATA=$(APPDATA); 
    </WixValues> 
    </PropertyGroup> 

처럼 보이는하지만 다른 모든 값이 OK 얻을에도 불구하고 어떻게 든 2 defineconstant 값은 명령 행에 도착하지 않습니다. 이

<MSBuild 
     Projects="$(SvnWorkingCopy)\InstallSE64wix\InstallSE64wix.wixproj" 
     Targets="Rebuild" 
     Properties="$([MSBuild]::Unescape($(WixValues)))" 
     /> 

여기 로리에서 프로젝트 파일 항목을

<DefineConstants>$([MSBuild]::Unescape($(WixValues)))</DefineConstants> 

어떤 도움을 나 일이있어 다른 사람이 이해할 수있을 것 같은

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 작업이 보인다.

감사합니다.

답변

6

나는 이것을 사용할 수 없습니다. wix users에서 답변을 찾았습니다 Alex Ivanoff에게 감사드립니다.

다음은 기본 개념입니다. wixproj 파일 1은 다음을 추가 : 당신은 MSBuild 작업에

<Target Name="BeforeBuild"> 
    <CreateProperty Condition="$(BuildNumber) != ''" 
Value="BuildNumber=$(BuildNumber);$(DefineConstants)"> 
     <Output TaskParameter="Value" PropertyName="DefineConstants" /> 
    </CreateProperty> 
    <CreateProperty Condition="$(RevisionNumber) != ''" 
Value="RevisionNumber =$(RevisionNumber);$(DefineConstants)"> 
     <Output TaskParameter="Value" PropertyName="DefineConstants" /> 
    </CreateProperty> 
    </Target> 

2 할이 :

<MSBuild Projects="YourWixProject.wixproj" 
    Properties="BuildNumber=$(VerBuildNumber);RevisionNumber=$(RevisionNumber)" 
/> 

주 속성은 표준 속성이 아니며, 일반적으로 그들이 통과되지 것 그러나이 경우 그들은 그렇게 할 것입니다. 비표준 속성과 함께 추가 표준 속성도 올바르게 전송됩니다.

관련 문제