Monday, May 01, 2006 11:22 AM
I'm trying to do something pretty simple. I have a large, complex project. I want to save it under a new name, so that I can make changes to it (changes that I wouldn't want to risk screwing up my original project).
I cannot for the life of me figure out how to do this in the C# IDE. There seems to be no option.
Saving it as a template isn't what I'm looking for. I want to duplicate the project so that the old version is safe, and there seems to be no way to do this.
Tell me I'm missing something.
Monday, May 01, 2006 11:48 AM
Save as only saves one file. For the project it actually only saves the project file.
What you want is source control like visual source safe. There are other free alternatives also like csv, subversion, sourcegear vault (for one user).
What you can do now without other software is to use windows explorer to make a copy of it, maybe to a compressed folder (zip file). If you want to go back you will restore the copy/zip of the project.
Monday, May 01, 2006 12:36 PM
I realize that I could manually tuck the files away someplace safe, but even that won't change the fact that the new project has the same name as the old one, etc.
In fact, I wanted to rename a project recently, and found that I couldn't. (It's original name was test1, and the project had outgrown the name).
I'm kind of dumbfounded. I love most aspects of the IDE. There are things that drive me nuts, but by and large, I really love this IDE. It's mostly very helpful and mostly helps me do what I want to do, which is more than you can what you can say about most IDEs. The developers were very thorough.
That's why I can't understand why something as rudimentary as a "Save As" option isn't there, or a "Rename" option. Yes, I can figure a way around it, but there's no elegant way around it. There must be a reason that such a basic feature wasn't included, and I'd like to know what it is.
Monday, May 01, 2006 12:41 PMIf you right-click on the project name in solution explorer you have an option "Rename". Is that what you are looking for?
Monday, May 01, 2006 3:33 PMAs far as I know, there is no mechanism within the IDE to rename *all* elements of a project. The problem, as has already been mentioned, is that the Save command works on individual artifacts. What you are doing is a branch, which is a well-known source-code function. Which is why the suggested choices were all source code based. And it’s unlikely to ever make it into the IDE, given that both VSS and Team Foundation Server provide that functionality.
Bruce Johnson [C# MVP]
Monday, May 01, 2006 4:43 PM
"Save As" is anything but a basic operation when you're dealing with projects, and it's not at all obvious how it would work. Should "Save As" copy just the project file, or all the source files as well? What about the binaries that have been built for the project? Should the new copy of the project go in the same solution as the original, or in a new solution, or no solution at all? What if the project references other projects in the same solution? Do we drop those references, or copy the referenced projects as well?
There are a lot of choices to make here, and a good chance that however "Save Project As" was implemented it would not work the way users might expect it to. Ultimately, though, this feature has not been implemented because there is frankly very little customer demand for it. Code management systems are the best accepted and understood means for handling changes, large and small, in source code.
Software Dev, Visual C# IDE
Thursday, August 11, 2011 3:11 AM
I have written a sample called CS/VBVSXSaveProject that could save a project to other location in Visual Studio.
If there is any feedback, feel free to tell me ( onecode at microsoft . com ).
Ruiz Yi [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Thursday, July 12, 2012 9:33 PM
Here is what I do - not splendid, but works for me. Go to:
C:\Documents and Settings\yourname\My Documents\Visual Studio 2010\Projects
Right Click and copy the folder, say ConsoleApplication1
Right Click and paste the folder. You now have 'Copy of ConsoleApplication1'.
I renamed it with the date. When you go to Open Project, there it is and it opens like any.
However, the folders under 'Copy of' are all the same names as before, and the Project Open window doesn't show you the parent folder names, so be careful about which version of your project you're opening.