简体   繁体   中英

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.

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. I don't want to scroll through hundreds of folders to get to the readme section when I upload the solution on 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,

  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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM