How to build 2 solutions from a single TFS team build definition

时光总嘲笑我的痴心妄想 提交于 2019-12-06 05:34:51

You can simply set two Solutions to build by creating them in an item group if I am understanding what you are trying to do

    <SolutionToBuild Include="$(BuildProjectFolderPath)/../../$(SuiteSourceBranchRoot)/MyCompany.Suite.sln">
      <Targets></Targets>
      <Properties></Properties>
    </SolutionToBuild>
    <SolutionToBuild Include="$(BuildProjectFolderPath)/../../$(SuiteSourceBranchRoot)/MyCompany.Another.sln">
      <Targets></Targets>
      <Properties></Properties>
    </SolutionToBuild>
  </ItemGroup>

You can also do it inside any build step with:

<!-- Build the deployment solution. -->
<MSBuild Projects="$(SolutionRoot)\$(SuiteSourceBranchRoot)/Company.Deployment.sln" Properties="Configuration=Release;" />

You can build multiple solutions from a single team build project definition by definitng multiple SolutionToBuild items in your TFSBuild.proj MSBuild project file.

<ItemGroup>
  <SolutionToBuild Include="$(SolutionRoot)\A\A.sln" />
  <SolutionToBuild Include="$(SolutionRoot)\B\B.sln" />
</ItemGroup>

You may also have to modify the build definition's workspace mapping to include sources for both solutions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!