Visual Studio 中大型解决方案的最佳实践 (2008) [英] Best practices for large solutions in Visual Studio (2008)

查看:33
本文介绍了Visual Studio 中大型解决方案的最佳实践 (2008)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个包含大约 100 多个项目的解决方案,其中大部分是 C#.自然,打开和构建都需要很长时间,因此我正在寻找此类野兽的最佳实践.沿着我希望得到答案的问题,是:

We have a solution with around 100+ projects, most of them C#. Naturally, it takes a long time to both open and build, so I am looking for best practices for such beasts. Along the lines of questions I am hoping to get answers to, are:

  • 你如何最好地处理项目之间的引用
    • 复制本地"应该打开还是关闭?

    每个项目都应该构建到自己的文件夹,还是应该构建到同一个输出文件夹(它们都是同一个应用程序的一部分)

    should every project build to its own folder, or should they all build to the same output folder(they are all part of the same application)

    解决方案的文件夹是一种组织东西的好方法吗?

    Are solutions' folders a good way of organizing stuff?

    我知道将解决方案拆分为多个较小的解决方案是一种选择,但这会带来一系列重构和构建问题,因此也许我们可以将其保存为单独的线程:-)

    I know that splitting the solution up into multiple smaller solutions is an option, but that comes with its own set of refactoring and building headaches, so perhaps we can save that for a separate thread :-)

    推荐答案

    您可能对我写的这两篇 MSBuild 文章感兴趣.

    You might be interested in these two MSBuild articles that I have written.

    MSBuild:创建可靠构建的最佳实践,第 1 部分

    MSBuild:创建可靠构建的最佳实践,第 2 部分

    特别是在第 2 部分中,您可能需要查看构建大型源代码树一节.

    Specificially in Part 2 there is a section Building large source trees that you might want to take a look at.

    在这里简要回答您的问题:

    To briefly answer your questions here though:

    • CopyLocal?请务必关闭此功能
    • 构建到一个或多个输出文件夹?构建到一个输出文件夹
    • 解决方案文件夹?这是一个品味问题.
    • CopyLocal? For sure turn this off
    • Build to one or many output folders? Build to one output folder
    • Solution folders? This is a matter of taste.

    赛义德·易卜拉欣·哈希米

    Sayed Ibrahim Hashimi

    我的书:微软构建引擎内部:使用 MSBuild 和团队基础构建

    这篇关于Visual Studio 中大型解决方案的最佳实践 (2008)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆