解决方案和项目结构指南 [英] Guidance on solution and project structure

查看:55
本文介绍了解决方案和项目结构指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在必须处理大量结构非常糟糕的解决方案和项目.我的第一个 bugbear 是项目文件夹中的解决方案文件.对我来说这很糟糕,因为项目从属于解决方案,并且保持健康的解决方案文件夹结构不应仅依赖于解决方案文件内容,而应隐含在实际的 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?

解决方案

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.

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.

这篇关于解决方案和项目结构指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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