How do I create a new project from an old project in Visual studio? MVC 5 C# Entity

bmanmike39
bmanmike39 used Ask the Experts™
on
How do I create a new project from an old project, without causing conflicts with the original program.  I would like to make a diffrent variation of the project. but 90% of the code is the same.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Umm... if 90% of the code is the same, just copy the entire source code into another folder and make your changes there?

Are you upgrading from one MVC version to another? If yes, then give details. If not, then copy and paste as above.

Are you using Git? Would you like to keep all the source in the same repo? Then create a branch and make your changes on the branch (or fork). If not, then copy and paste as above.

Author

Commented:
I want it to have a different project name an number. Do I create the project, then copy the files over.  and will the entity work?  When I tried this and got a large number of files that where excluded from the project.
Retired
Distinguished Expert 2017
Commented:
Hi bmanmike39;

As stated by @MlandaT first copy the MVC project folder to a new location changing the folder name if you like. Now in Visual Studio open that project in its new location. Once the project is opened in Solution Explorer right click on the solution name and select Rename from the menu and rename the project name you wish to change. To do changes in the code files do the same, right click on a variable name and select Rename and rename the variable, select any options to change in the complete project. After doing a name change rebuild the project to make sure it still compiles.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial