Oleksii
Oleksii

Reputation: 1549

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?

Upvotes: 16

Views: 11231

Answers (3)

Sébastien Sevrin
Sébastien Sevrin

Reputation: 5405

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)

Upvotes: 22

Haitham Shaddad
Haitham Shaddad

Reputation: 4456

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.

Upvotes: 4

Balaji
Balaji

Reputation: 1515

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

Upvotes: 0

Related Questions