Visual Studio 中的项目布局(在磁盘上)
管理磁盘上 Visual Studio 项目物理布局的最佳方法是什么? 我已经到了有几个文件夹的地步,但我无法真正继续按照现在的方式进行分类。 例如,我有几个自定义控件,但有时这些控件与应用程序设置有关,那么它们是进入“控件”文件夹还是“应用程序设置”文件夹? 我有许多成熟的表单驻留在主源文件夹中,因此寻找正确的源文件有点令人畏惧。
是否有任何人可以提供有关如何将中型项目组织到文件夹层次结构中的任何提示,这样他们就不会疯狂地尝试在项目中查找某些内容?
What's the best way to manage the physical layout of a Visual Studio project on disk? I'm getting to the point where I have several folders but I can't really continue categorizing the way I am now. For example, I have several custom controls, but sometimes those controls have to do with application settings, so do they go into the Controls folder or Application Settings folder? I have many full-fledged forms that reside in the main source folder so that it's getting a bit daunting looking for the right source file.
Are there any tips anyone can offer on how they organize their medium-sized projects into folder hierarchies so they don't go insane trying to locate something in the project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通常根据命名空间来组织文件夹。 例如,命名空间“Company.Project.DataAccess”中的类将存储在company/project/dataAccess目录中。
我承认,管理打开文件仍然有点痛苦。 但是,Resharper 的“转到类型”功能消除了我在解决方案资源管理器中的所有搜索。
I typically organize my folders based on my namespaces. For example, classed in the namespace "Company.Project.DataAccess" would be stored in company/project/dataAccess directory.
I admit that this is still slightly painful to manage opening files. However, Resharper's "Go to type" feature has eliminated all of my searching in Solution Explorer.
这是我通常在中型项目中使用的层次结构。
一个由 3 个项目组成的解决方案文件:
我将有一个第四个项目项目(如果我使用自定义 WebControls)。 在 Web 应用程序项目中,我将拥有常用的文件夹,例如 css、images、includes、scripts等,以及用户控件的文件夹(如果我正在使用它们)。 我几乎总是将应用程序设置存储在 Web.config 中。
This is the hierarchy I typically use in medium sized projects.
A solution file consisting of 3 projects:
I'll have a forth project if I'm using custom WebControls. Within the Web app project, I'll have the usual folders such as css, images, includes, scripts, etc, as well as a folder for user controls if I'm using them. I almost always store my app settings in the Web.config.