Visual Studio:如何根据依赖性安排解决方案资源管理器中的项目

问题描述:

有什么方法可以根据依赖关系(在更高级别上依赖项目)在VS 2010+的解决方案资源管理器中手动安排项目?

Is there any way to manually arrange the projects inside solution explorer of VS 2010+ based on the dependency (dependent project on higher level) ?

否,但是当我有很多项目要传达此构建流程的解决方案时,我会做一些适合您需要的事情.

No, but when I have a solution with a lot of projects that I want to convey this build flow, I do something that may suit your needs.

由于解决方案资源管理器按字母顺序对事物进行排序,因此将项目放入解决方案文件夹"中.我在每个项目文件夹上都添加了前缀.因此,我可能将文件夹命名为"A.Helper Assemblys" .因此,我的解决方案如下所示:

Because the Solution Explorer sorts things alphabetically, I put projects into "Solution Folders". I put a prefix on each project folder. So, I might name a folder "A. Helper Assemblies". So, my solution looks like this:

解决方案
   A.助手程序集
      Project1.vsproj
      Project2.vsproj
   B.核心程序集
      ProjectX.vsproj
      ProjectY.vsproj
   C.用户界面程序集
      ProjectMoe.vsproj
      ProjectLarry.vsproj
      ProjectShemp.vsproj

Solution
   A. Helper Assemblies
      Project1.vsproj
      Project2.vsproj
   B. Core Assemblies
      ProjectX.vsproj
      ProjectY.vsproj
   C. UI Assemblies
      ProjectMoe.vsproj
      ProjectLarry.vsproj
      ProjectShemp.vsproj

但是,这不会更改任何项目依赖项.确保项目构建顺序与文件夹结构相匹配只是手动操作.

This doesn't change any project dependencies, though. It's simply a manual effort to ensure that the project build order matches the folder structure.

有关添加解决方案文件夹的确切详细信息,请转到此处:

For exact details on adding a Solution Folder, go here: http://msdn.microsoft.com/en-us/library/c6c756s6(v=vs.100).aspx