How can I save a Visual Studio project with different name (like save as)?

Massimo D. N.  picture Massimo D. N. · May 18, 2017 · Viewed 32.6k times · Source

In Visual Studio, I usually call my start project as project V 1_0. Going forward with the project, adding parts, i have the necessity to maintain the previous versions and save the newest with different file name, as project v 1_5 or project v 2_0 to have the history and a backup.

Under File, there is the possibility to save the project As something else, but its only the project file (.sln). What about all the folders and relative files?

How can I save all as forward release?

Answer

Dávid Molnár picture Dávid Molnár · May 18, 2017

Very simple:

  1. Open the folder where the solution and the projects are.
  2. Make a copy of the desired project folder.
  3. Rename the *.csproj file in the copied project folder to the new project name.
  4. Open the solution in the Visual Studio, right click on the solution and select Add -> Existing project. Then select the project file you renamed in step 3.

Paths in the project file are relative, so everything should work just fine.