简体   繁体   中英

Extracting a project as a separate project from the Visual Studio solution

I'm using Visual Studio 2013 and I have a solution that contains multiple projects.

I would like to extract one project from a solution to create a new, separate solution, that would only contain this one project.

Does anyone know how to do this?

If by "Extract", you mean "Duplicate" your project and start a new solution with this project, here is what you can do:

  1. Create a new solution in Visual Studio
  2. Copy your Project folder in the root of the new solution
  3. Right click on the solution => Add existing Project and select the project file (*.csproj in this case)

Copy the project folder into separate folder, open the .csproj file, press CTRL + S , it will open the save dialog and you will save the .sln file. That is it.

Right click on any project, then Exclude from Project . The excluded files will be in the project folder. Move those files to another folder, in the way you want it. Then you can create and add those files in new project by Add existing item

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