解决方案和项目结构指南

发布于 2024-10-07 02:48:40 字数 324 浏览 0 评论 0原文

我现在必须处理大量结构非常糟糕的解决方案和项目。我的第一个烦恼是项目文件夹中的解决方案文件。对我来说,这听起来很糟糕,因为项目从属于解决方案,维护健康的解决方案文件夹结构不应仅依赖于解决方案文件内容,而应隐含在实际的 Windows 文件夹结构中。

我想提出一个供我和我的同事使用的标准,并在此建议一个真正的分层结构,其中包含一个包含解决方案文件的代码文件夹,以及所有项目的从属文件夹,仅包含 .csproj 文件和源代码,没有解决方案文件!我也非常想包括一些有用的背景信息来证明我的建议的合理性,但我不想啰嗦太多,并且希望我可以引用来源,当然还要注明出处。为此我可以参考哪些好的文章、教程、书籍等?

I now have to deal with a whole lot of very badly structured solutions and projects. My first bugbear is solution files within project folders. To me this smells very bad, as projects are subordinate to solutions, and maintaining a healthy solution folder structure should not rely only on the solution file contents, but should be implicit in the actual Windows folder structure.

I would like to propose a standard for use by me and my colleagues, and in this suggest a truly hierarchical structure with a Code folder containing a solution file, and subordinate folders for all projects, containing only .csproj files and source, no solution files! I would very much also like to include some useful background information justifying my proposal, but I don't want to ramble too much and would like sources I could maybe quote, with attribution of course. What good articles, tutorials, books, etc. could I consult for this?

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

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

发布评论

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

评论(1

热风软妹 2024-10-14 02:48:40

关于此主题的一篇很好的参考文章可以在此处找到。
注意:这是一篇非常古老的文章,可以追溯到 .net 1.1 时代,但有关项目/解决方案的一般原则仍然非常相同并且仍然适用,IMO

请注意,本文讨论的是如何构建解决方案并与 VSS 一起使用,但如何组织项目和解决方案的一般原则适用于任何源代码控制系统(我会大胆假设您不使用 VSS :-))

文件夹结构,特别是,不同的项目甚至可能根据其逻辑架构进行不同的组织。然而,本文还将为您提供一个参考点,以表明您的解决方案比一般项目处于更高的水平。

alt text

此博客还在讨论整体解决方案/项目结构,如果它们与您的代码相关,您可能需要使用此处提出的一些观点。

A good reference article on this topic can be found here.
Note: This is a very OLD article dating back to the days of .net 1.1 but the general principles about projects / solutions still very much remain the same and still apply, IMO

Note that this article is talking about how to structure solutions and use with VSS but the general principle of how to organize the projects and solutions apply to any source control system (i will take a leap of faith and assume that you do not use VSS :-))

Folder structure, specifically, is something that different projects may even organize differently based on their logical architecture. However, this article will also give you a point of reference to make your point about solutions being at a higher level than the projects in general.

alt text

This blog is also discussing overall solution / project structure and you might want to use some of the points made here if they are relevant to your code.

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