gpt4 book ai didi

tfs - 使用多个团队项目构建团队

转载 作者:行者123 更新时间:2023-12-04 19:23:39 25 4
gpt4 key购买 nike

我有以下结构:

$
--TeamProject1
---Solution1.sln
----TestProject1
--TeamProject2
---Solution2.sln
----TestProject2

在 TestProject1 中,我添加 TestProject2.dll 作为引用(不是项目引用,而是文件引用)。我的问题是:如何构建一个引用属于不同团队项目的程序集的解决方案?

我有包含以下信息的 TFSBuild.proj 文件:
<TfCommand>$(TeamBuildRefPath)\..\tf.exe</TfCommand>

<SolutionToBuild Include="$(BuildProjectFolderPath)/../../DEV/TeamProject1.sln">
<Targets></Targets>
<Properties></Properties>
</SolutionToBuild>
<Map Include="$/TeamProject1">

<LocalPath>$(SolutionRoot)</LocalPath>

</Map>

<Map Include="$/TeamProject2">

<LocalPath>$(SolutionRoot)</LocalPath>

</Map>
<Target Name="BeforeGet">
<DeleteWorkspaceTask TeamFoundationServerUrl="$(TeamFoundationServerUrl)" Name="$(WorkspaceName)" />
<Exec WorkingDirectory="$(SolutionRoot)" Command="&quot;$(TfCommand)&quot; workspace /new $(WorkspaceName) /server:$(TeamFoundationServerUrl)" />
<Exec WorkingDirectory="$(SolutionRoot)" Command="&quot;$(TfCommand)&quot; workfold /unmap /workspace:$(WorkSpaceName) &quot;$(SolutionRoot)&quot;" />
<Exec WorkingDirectory="$(SolutionRoot)" Command="&quot;$(TfCommand)&quot; workfold /map /workspace:$(WorkSpaceName) /server:$(TeamFoundationServerUrl) &quot;%(Map.Identity)&quot; &quot;%(Map.LocalPath)&quot;" />
</Target>

提前致谢。

小苏

最佳答案

引用 official TFS guide on CodePlex :

If you share source or binaries across team projects, you have two options:

  • Branching. With this approach, you branch the source from the other team project into your current solution. This creates a configuration that unifies the source from the shared location and your project on the server-side.

  • Workspace Mapping. With this approach, you map the source from the other team project into a workspace on your development computer. This creates a configuration that unifies the source from the other team project and your project on the client-side.

Branching is the preferred approach because it stores the dependency relationship on the source control server. Workspace mapping is a client-side-only approach, which means that you and every developer must create the mapping on your own computers and also on the build server in order to successfully build the application.

Branching adds additional merge overhead but it enables you to make the decision to pick up updated binaries or source more explicitly.

关于tfs - 使用多个团队项目构建团队,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1630571/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com