gpt4 book ai didi

TFSBuild/MSBuild 和项目引用与文件引用

转载 作者:行者123 更新时间:2023-12-04 12:38:26 26 4
gpt4 key购买 nike

我们有一个使用由 TFS Build 构建的项目引用的大型 VS 解决方案,如下所示:

Solution
- Project 1
- Project 2
- Project ...
- Project N

由于解决方案太大,我们有几个日常使用的较小的解决方案:
SubSolution
- Project 1
- Project 19

问题是在 SubSolution 上工作的开发人员发现它没有构建,因为找不到项目引用,所以他们将项目更改为使用文件引用。

然后继续破坏 TFS 构建,它无法找到这些文件引用,因为它们尚未构建(即使项目在同一个解决方案中)。有没有办法解决这两种引用之间的这种拉锯战。拆分解决方案的正确方法是什么?

最佳答案

What is the correct way of splitting out your solutions?



从 Patterns & Practices 团队的 TFS 指南中查看本章:

Chapter 3 - Structuring Projects and Solutions in Source Control

请特别注意“分区解决方案”场景的注释(我相信您实际上正在尝试实现):

Unlike previous versions of Visual Studio, Visual Studio 2005 relies upon MSBuild. It is now possible to create solution structures that do not include all referenced projects and still build without errors. As long as the master solution has been built first, generating the binary output from each project, MSBuild is able to follow project references outside the bounds of your solution and build successfully. This only works if you use project references, not file references. You can successfully build solutions created this way from the Visual Studio build command line and from the IDE, but not with Team Build by default. In order to build successfully with Team Build use the master solution that includes all of the projects and dependencies.

关于TFSBuild/MSBuild 和项目引用与文件引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2386238/

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