简体   繁体   English

如何将项目放在 Visual Studio 解决方案中的一个文件夹中

[英]How to put projects in one folder in a Visual Studio solution

I did some problem-solving in C++, and the current file structure looks like this.我在C++中做了一些解题,目前的文件结构是这样的。

solution/
├── project_1/
│   ├── src/
│   │   └── Main.cpp
│   ├── project_1.vcxproj
│   └── project_1.vcxproj.filters
├── (more projects)
└── solution.sln

I want to put all projects in one folder and still be able to open the solution in Visual Studio just as I used to before.我想将所有项目放在一个文件夹中,并且仍然能够像以前一样在 Visual Studio 中打开解决方案。 I don't want to scroll through hundreds of folders to get to the readme section when I upload the solution on GitHub.当我在 GitHub 上上传解决方案时,我不想滚动浏览数百个文件夹以进入自述文件部分。

solution/
├── projects/
│   ├── project_1/
│   │   ├── src/
│   │   │   └── Main.cpp
│   │   ├── project_1.vcxproj
│   │   └── project_1.vcxproj.filters
│   └── (more projects)
└── solution.sln

Is this possible?这可能吗? Should I not create a project for each question?我不应该为每个问题创建一个项目吗?

As @drescherjm and @heapunderrun commented,正如@drescherjm 和@heapunderrun 评论的那样,

  1. Put all project folders in one folder in File Explorer,将所有项目文件夹放在文件资源管理器中的一个文件夹中,
  2. Remove all projects from the solution in Solution Explorer,在解决方案资源管理器中从解决方案中删除所有项目,
  3. Right-click on the solution and add → existing project all projects.右键单击解决方案并添加→现有项目所有项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用cmake和visual studio在一个解决方案中的几个项目 - Several projects in one solution with cmake and visual studio c ++ visual studio 2008问题,在一个解决方案中有两个项目 - c++ visual studio 2008 issue with two projects in one solution Visual Studio在一个解决方案中“同步”多个项目 - Visual Studio “synchronize” multiple projects within one solution 将两个项目链接到一个解决方案中 Visual Studio 2013 - Linking two projects in one solution visual studio 2013 具有多个项目的 Visual Studio 解决方案 - Visual studio solution with multiple projects Visual Studio解决方案:静态或共享项目? - Visual Studio Solution: static or shared projects? 在Visual Studio解决方案中链接两个项目 - Linking two projects in a Visual studio solution 具有多个项目的visual studio解决方案无法编译 - visual studio solution with multiple projects doesnt compile 在多项目Visual Studio解决方案中以不同配置编译项目 - Compiling projects in different configurations in a multi-projects Visual Studio Solution IncrediBuild 在一个线程中编译 Visual Studio 2010/2012 解决方案的一些项目 - IncrediBuild compile some projects of Visual Studio 2010/2012 solution in one thread
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM