我有一個使用teambuild/msbuild的當前版本,我需要將wix編譯集成到。msbuild wix proj文件
Wix項目不是正在構建的解決方案的一部分,而是與TFSBuild.proj目錄中的各種工具一起生活。
在構建安裝項目之前,我必須使用Heat來收集在編譯後目標期間創建的幾個目錄。我有這樣好的工作,但現在我不知道如何編譯我的WiX工程
編譯後的目標看起來像這樣
<Target Name="AfterCompile" DependsOnTargets="CopyOutputFiles;BuildMsi;BuildZip" />
凡拷貝輸出文件複製編譯後的文件到指定目錄和對他們做了一些更多的工作,這是我需要包含在我的Wix項目中的輸出。
BuildMsi目標目前看起來像這樣。
<Target Name="BuildMsi" >
<Message Text="Start harvesting Website files for Wix compliation" />
<HeatDirectory
ToolPath="$(WixToolPath)"
Directory="$(DropLocation)\Latest\x86\Release\_PublishedWebsites\IFMA.MasterPlan.Web"
GenerateGuidsNow="yes"
ComponentGroupName="MasterPlanWeb"
OutputFile="$(MSBuildProjectDirectory)\Setup\Product\Fragments\wwwfiles.wxs"
SuppressFragments="yes"
DirectoryRefId="WEBROOT"
KeepEmptyDirectories="yes"
PreprocessorVariable="var.WebRoot"
SuppressRegistry="yes"
SuppressRootDirectory="yes"
SuppressCom="yes" />
<Message Text="Finished harvesting Website files for Wix compliation" />
<Message Text="Start harvesting database files for Wix compliation" />
<HeatDirectory
ToolPath="$(WixToolPath)"
Directory="$(DropLocation)\Latest\x86\Release\Database"
GenerateGuidsNow="yes"
ComponentGroupName="MasterPlanWeb"
OutputFile="$(MSBuildProjectDirectory)\Setup\Product\Fragments\dbfiles.wxs"
SuppressFragments="yes"
DirectoryRefId="WEBROOT"
KeepEmptyDirectories="yes"
PreprocessorVariable="var.WebRoot"
SuppressRegistry="yes"
SuppressRootDirectory="yes"
SuppressCom="yes" />
<Message Text="Finished harvesting database files for Wix compliation" />
</Target>
所以,現在的維克斯目錄$(MSBuildProjectDirectory)\設置有片段的需求,我只需要基本編譯WiX工程 「$(MSBuildProjectDirectory)\ SETUP \ Setup.proj」。
我必須先調用蠟燭任務並指定各種屬性,然後將其輸出傳遞給輕任務,或者我可以直接編譯.proj文件,因爲它已經擁有了它所需的所有信息(如引用庫等)。
在解決方案中沒有包含安裝項目的特殊原因嗎?您仍然可以在.wixproj的BeforeCompileAndLink目標中手動收集目錄。 –