There is an old thread for this question here:
How to make a Copy of a Project/Solution in Microsoft Visual Studio 2012?
But the methods suggested there do not work anymore.
Can someone detail how to do the following:
A quick and dirty way to create a copy of a preexisting VS 2015 project with a new name.
I've done this many times throughout visual studio versions and it's always worked.
Copy the Solution folder
Rename the new folder to what I want [no spaces or special characters]. Go into this folder
Example: MyProject
Rename the .sln file to what I want, usually the same name as the folder.
Example: MyProject.sln
Open the .sln file in notepad. Change the following line in TWO places: one for the solution name and the other to the relative path of your .csproj file.
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OldProjectName", "website\OldProjectName.csproj", "{BDDE3242-B5CA-42C3-A111-A4F5BFCCF28C}"
NEW FIX
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject", "website\ MyProject.csproj", "{BDDE3242-B5CA-42C3-A111-A4F5BFCCF28C}"
Close and save the file. If you want to replace the guids with new ones you can but do a global search and replace to ensure you change all the references.
Next Rename the .csproj file to MyProject.csproj
If you changed the guids in the solution file you will need to change these references in the project file.
Open the solution in Visual Studio
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With