Copy project files to a new project
-
I am new to C# and have been testing many features in a single project. Now that I have tested and refined what I have done I would like to "copy" the classes, forms and some other information to a new (non cluttered) project. What is the the best way of going about this. Copy the whole project folder to a new project folder and take out the things I don't need?? Thanks for you help.
-
I am new to C# and have been testing many features in a single project. Now that I have tested and refined what I have done I would like to "copy" the classes, forms and some other information to a new (non cluttered) project. What is the the best way of going about this. Copy the whole project folder to a new project folder and take out the things I don't need?? Thanks for you help.
-
Visual Studio has an "Add existing..." feature. Create your new project, and right-click the project in the Solution Explorer, select "Add" -> "Existing Item...". Don't manually shift around stuff, *ever*.
modified on Wednesday, July 1, 2009 3:24 AM
Narvius wrote:
Don't manually shift around stuff, *ever*.
How I wish we didn't have to! Alas, there are times when Visual Studio and Visual SourceSafe conspire to make manual interventions the only option, such as if a project under source control is to be renamed. With luck these issues will simply go away when we eventually move to Team System... While I'm on it bitching about source control, the "web project without a project" is the worst idea I've come across this far. Surely it would be possible to have a project file and still use the dynamic compilation model? Now, if my web app has the audacity to write a log file (or any file really) anywhere under the web site root, Visual Studio very cleverly decided this is a "newly added file" and proceeds to add it to the SourceSafe database if I check in the solution. I wonder who's great idea that was! Oh well. :§