msbuild wix项目文件

msbuild wix项目文件,msbuild,wix,tfsbuild,Msbuild,Wix,Tfsbuild,我有一个使用teambuild/msbuild的当前构建,需要将wix编译集成到其中 Wix项目不是正在构建的解决方案的一部分,而是与TFSBuild.proj目录中的各种工具一起使用 在构建安装项目之前,我必须使用Heat来获取在编译后目标期间创建的两个目录。我有这个工作正常,但现在我不知道如何编译我的wix项目 编译后的目标如下所示 <Target Name="AfterCompile" DependsOnTargets="CopyOutputFiles;BuildMsi;Build

我有一个使用teambuild/msbuild的当前构建,需要将wix编译集成到其中

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>

现在Wix目录$(MSBuildProjectDirectory)\Setup有了它需要的片段,我只需要编译Wix项目“$(MSBuildProjectDirectory)\Setup\Setup.proj”


我是否必须首先调用candle任务并指定各种属性,然后将其输出传递给light任务,或者我是否可以直接编译.proj文件,因为它已经具有所需的所有信息(例如引用库等)。

我将为您的产品创建一个.wixproj,其中包含编译元素列表,将BuildMsi目标放在上面的.wixproj中,并在编译链接之前安排它。然后将TFS指向MSBuild.wixproj


这样,您的安装版本就被干净地包含了。

您的解决方案中不包含安装项目有什么特别的原因吗?您仍然可以在.wixproj的BeforeCompileAndLink目标中手动获取目录。