Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 641
Massimo D. N. Avatar asked Dec 14 '22 23:12

Massimo D. N.


2 Answers

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.

like image 162
Dávid Molnár Avatar answered Dec 22 '22 00:12

Dávid Molnár


I've been looking for the elusive "Save As" workaround for Visual Studio, and ran across this on Microsoft's website: https://msdn.microsoft.com/en-us/library/754c3hy7.aspx

On the menu bar, choose File, New, Project From Existing Code. The Create New Project from Existing Code Files wizard opens.

I'm a total noob - and could very likely be doing something wrong - but it opened up the same project - but with a different name. Any changes to the new file also happened on the original file. Maybe you're supposed to drag/copy the old files into the new project?

Thought I'd post this here because it's from Microsoft so it might be useful in the right hands - and I'd hadn't seen any mention or reference to it in any of the workarounds.

like image 24
Sandy G Avatar answered Dec 21 '22 23:12

Sandy G