Visual-Studio – Copy and rename the solution under Source Code Management in Visual Studio 2013

I have a VS2013 solution called ShoppingService.sln with 7 projects under TFS source code control.
Now I want to make a copy of the solution and rebuild it Name it’BasketService.sln’ and place it under source control again.
I don’t want to branch the original solution because the two solutions should coexist separately from each other.

What is the fastest or best way?

Okay, this is what I ended up doing:

>Copy the entire solution folder to a new location.
>Delete all source control files. They start with *.vs.
>Delete all read-only attributes of folders and files.
>Renew Folder open the solution and rename the solution and each project.
>Open the properties of each project and edit the assembly name and default namespace.
>Close the solution.
>Rename the disk
>Edit the solution file in texteditor. Replace all references with the new folder name and delete the team foundation part in .sln.
>Open the solution in VS again and fix any Remaining problem. I used Resharper to fix the new namespace.
>Search the old solution/folder name in all files and update with the new name
>Consider deleting the obj and bin folders to force Visual Studio regenerates all these files during the build
>Add the solution to the source control again.

And you are done.

I There is a VS2013 solution called ShoppingService.sln with 7 projects under TFS source control.
Now I want to make a copy of the solution, rename it to’BasketService.sln’ and place it again Under source control.
I don’t want to branch the original solution because the two solutions should coexist separately from each other.

What is the fastest or best way?

Ok, this is what I ended up doing:

>Copy the entire solution folder to a new location .
>Delete all source control files. They start with *.vs.
>Delete all read-only attributes of folders and files.
>Open the solution from the new folder and rename the solution and each Project.
>Open the properties of each project and edit the assembly name and default namespace.
>Close the solution.
>Rename the folder on the disk.
>In the texteditor Edit the solution file. Replace all references with the new folder name and delete the team foundation part in .sln.
>Open the solution in VS again and fix any remaining issues. I use Resharper to fix the new namespace .
>Search the old solution/folder name in all files and update with the new name
>Consider deleting the obj and bin folders to force Visual Studio to regenerate all these files during the build
>Add the solution to the source control again.

And you are done.

Leave a Comment

Your email address will not be published.