之所以要讨论项目代码放置的结构,是因为他关系到项目的协作、项目的分支合并以及项目的生成。
一般来说,常用的三种放置策略有
单解决方案(Single solution): 适用于小项目,建立一个解决方案并防止所有的相关项目代码。
分段解决方案(Partitioned solution):适用于大项目, use multiple solutions to group related projects together. Create solutions to logically group subsets of projects that a developer would be most likely to modify as a set, and then create one master solution to contain all of your projects. This approach reduces the amount of data that needs to be pulled from source control when you only need to work on specific projects.
多解决方案(Multiple solutions). If you are working on a very large system that requires dozens of projects or more, use multiple solutions to work on sub-systems but for dependency mapping and performance reasons do not create a master solution that contains all projects.
单解决方案:
分段解决方案:
/Source
- /WinFormsProject
- /WebProject
- /WindowsServiceProject
- /ClassLibrary1
- /ClassLibrary2
- /ClassLibrary3
- Web.sln
- Service.sln
- All.sln
参考资料《Team Development with Visual Studio Team Foundation Server》