'Saving Visual studio Project as new name
Basically what I'm looking for is what is visual studio 'Save As'.
I have a program that I would like to use as a base for building a couple of other programs off of. For the life of me I cant find out how to simply make a copy of my program so I have a back up of the original. Any ideas? What am I missing?
Solution 1:[1]
If you want a copy, the fastest way of doing this would be to save the project. Then make a copy of the entire thing on the File System. Go back into Visual Studio and open the copy. From there, I would most likely recommend re-naming the project/solution so that you don't have two of the same name, but that is the fastest way to make a copy.
Solution 2:[2]
Apparently Visual Studio is missing the 'Save As' feature, so you'll have to back up your projects by manually copying them to a new location.
Solution 3:[3]
Here's how I do a project "Save As" for C# projects. The challenge is finding all the places where your project name is and giving it a new project name. You need to rename two folders, rename two files, go into .sln to edit project and path, and go into three files and edit the namespace:
- Copy project folder.
- Rename project folder.
- Go into project folder.
- Rename the inside project folder.
- Rename .sln file.
- Edit inside .sln file and rename project and project path.
- Go into inside project folder.
- Rename .csproj file.
- Edit inside Form1.cs and rename namespace.
- Edit inside Form1.Designer.cs and rename namespace.
- Edit inside Program.cs and rename namespace.
I use Notepad to go inside the .sln and .cs files. It goes pretty fast. I also use GIT, but there are definitely good reasons for a new project, like when you want to do major tweaks and a new project is appropriate, but you want to quickly leverage off your old project. Maybe Microsoft will add a "Save As" for projects in the future!
Solution 4:[4]
Just found a way of doing it that haven't been mentioned yet, go to :
File > New > Project From Existing Code ...
Choose your language, the folder where the project you want to base yourself on is located and the new name of the project and it's type. Done !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Prasanth Louis |
Solution 2 | Metzgermeister |
Solution 3 | Ken Crandall |
Solution 4 | Guillaume G |