Visual Studio 中解决方案文件的最佳位置是什么?

发布于 2024-07-21 04:41:27 字数 149 浏览 4 评论 0原文

我更喜欢将解决方案文件与 Visual Studio 中的项目文件放在同一文件夹中。 我知道这是通过取消选中“为解决方案创建目录”复选框来完成的。 但是,VS 2008 默认情况下会选中该框。

我对其他人关于解决方案文件是否应该位于同一目录中的意见感兴趣。

I prefer for the solution file to be in the same folder as the project files in Visual Studio. I know this is accomplished by unchecking the "Create directory for solution" checkbox. However, VS 2008 defaults to having the box checked.

I am interested in other people's opinions on whether the solution file should live in the same directory.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

预谋 2024-07-28 04:41:27

当一个解决方案包含多个项目时,我喜欢父目录中的解决方案文件和其子目录中的项目文件。

当解决方案包含许多项目(我当前的解决方案有 36 个项目/程序集)时,我将拥有:

  • 祖父母:解决方案
  • 子目录:“解决方案文件夹" 这是项目的逻辑集合
  • 孙子:项目本身

我也同意将解决方案及其项目放在同一个文件夹中,< em>如果解决方案只有一个项目。 如果您像这样开始并希望稍后向解决方案添加另一个项目,则很容易更改(例如,在父目录中创建新解决方案或移动现有解决方案,然后向其中添加/重新添加现有项目)。

只是不要将多个项目放在同一个文件夹中。

When a solution contain more than one project, I like a solution file in a parent directory and the project files in its child directories.

When a solution contains many projects (my current solution has 36 projects/assemblies), then I'll have:

  • Grandparent: solution
  • Child directories: "solution folders" which are logical collections of projects
  • Grandchildren: the projects themselves

I also agree with having the solution and its project in the same folder, if the solution only has one project. And if you start like this and want to add another project to the solution later, it's easy to change (e.g. create a new solution in a parent directory or move your existing solution, and add/re-add the existing project to it).

Just don't put several projects in the same folder.

一曲琵琶半遮面シ 2024-07-28 04:41:27

我更喜欢这样的:

MyProject
  src
    Domain
    Application
    Infrastructure
    UI
  solutions
    MyProject
    Infrastructure
    Domain

解决方案文件夹包含解决方案文件夹。 所有项目均从 src 文件夹引用。

I prefer it something like this:

MyProject
  src
    Domain
    Application
    Infrastructure
    UI
  solutions
    MyProject
    Infrastructure
    Domain

Solutions folder contains solution folders. All projects are referenced from src folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文