我有以下结构:
$
--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=""$(TfCommand)" workspace /new $(WorkspaceName) /server:$(TeamFoundationServerUrl)" />
<Exec WorkingDirectory="$(SolutionRoot)" Command=""$(TfCommand)" workfold /unmap /workspace:$(WorkSpaceName) "$(SolutionRoot)"" />
<Exec WorkingDirectory="$(SolutionRoot)" Command=""$(TfCommand)" workfold /map /workspace:$(WorkSpaceName) /server:$(TeamFoundationServerUrl) "%(Map.Identity)" "%(Map.LocalPath)"" />
</Target>
提前致谢。
小苏