英文:
Is there a way to group related files in Visual Studio?
问题
考虑一个典型的.NET网页解决方案。对于一个给定的网页,您会有视图(.cshtml)、页面的.js文件、页面的.css文件、控制器类、视图模型文件、业务对象、存储过程等等...
所有这些都存储在解决方案中的不同目录/项目中。所以我花了很大一部分时间四处寻找它们。
在VS中是否有一种构造可以让我将它们组织在一起,这样我就不必四处寻找它们了?例如,一些虚拟文件夹,其中包含这些文件。
Employee.cshtml,
employee.js,
employee.css,
EmployeeController.cs,
EmployeeViewModel.cs,
EmployeeEntity.cs,
get/upd/ins/delEmployee.sql,
等等...
英文:
Consider a situation with a typical .NET web solution. For a give web page you have the view (.cshtml), page's .js file, page's .css file, controller class, View Model file, the business object, the stored proc, etc...
All these reside in different directories/projects in the solution. So I spent a good portion of time hunting around for these.
Is there a construct in VS that allows me to group these together somewhere, so I don't have to go hunting for them? E.g. some virtual folder that has these files in it.
Employee.cshtml,
employee.js,
employee.css,
EmployeeController.cs,
EmployeeViewModel.cs,
EmployeeEntity.cs,
get/upd/ins/delEmployee.sql,
etc...
答案1
得分: 1
你可以使用我的Tabs Studio扩展来对这些文件进行分组,这样当打开其中一个文件时,右键单击已打开标签标题将显示所有对应的文件,并具有快速打开它们的功能。
需要设置适用于你的解决方案组织的自定义标题和路径分组规则:
https://tabsstudio.com/documentation/visual_studio_tab_grouping.html
英文:
You can group these files with my Tabs Studio extension, so that when one of these files is opened, right clicking on the opened tab title will show all corresponding files with the ability to quickly open them.
It will require to set up custom title and path grouping rules specific for your solution organization:
https://tabsstudio.com/documentation/visual_studio_tab_grouping.html
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论