Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If i want to make a copy of my c# project in the same workspace how can i do it?

In other words lets say i have already completed a project using visual studio. Now i want to make a separate project that is identical to the already completed project(except for some future changes).

How can i do this while keeping the new project in the same workspace as the original without:

  • creating a new project and copy pasting code over
  • copy-pasting the folder that holds the project and changing the name of the folder

I'm asking because there must be a better way to do this than the two options above.

like image 609
rage Avatar asked Mar 22 '13 03:03

rage


1 Answers

  1. Right click on the solution and "Open Folder in File Explorer"
  2. Copy the project folder
  3. Rename the new Project folder
  4. Open the new project folder and rename the .csproj file
  5. Right click on the solution and "Add" "Existing Project" to the solution
  6. Open the "Properties" for the new project
  7. Under "Application", change the assembly name and default namespace
  8. Select "Tools", "Create GUID", Option 6, "Copy"
  9. Under Assembly information, change the name and product
  10. Paste in the GUID and clear the "" suffix
  11. Rename the namespace in the source files to reflect the new namespace from above.

Depending on your needs, you could get by with a subset of these steps (e.g. steps 1 and 2), however, I think a complete copy requires all of the steps mentioned.

like image 102
David Rogers Avatar answered Sep 19 '22 04:09

David Rogers