Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Copy Project

I would like to make a copy of my project. I would rather not start doing it from scratch by adding files and references, etc. Please note that I don't mean copy for deployment. Just plain copy.

Is there a tool in VS to do this? I am using VS 2008

like image 745
sarsnake Avatar asked May 19 '09 18:05

sarsnake


People also ask

How do I copy a project from one project to another?

From the project, you can click on the title of the project to open up the details pane. From there, you can select “Copy project” from under the “…” menu. Your new project will be created with the same original project name with “- Copy” added to it so you can easily track the copied project.


2 Answers

Just create a template;

From your project choose: Project - Export Template

The wizard will let you define

  • Template name
  • Template Description
  • Icon
  • Preview image

Then it zips up your project into 'My Exported Templates' directory. You also have the option to make your template available when you create a new project.

When you use your template to create a new project, the namespace will be correct for 'your_new_project_name' throughout every file, all references correct, everything perfecto :)

You can send the .zip file to anybody, and they must copy (not unzip) the .zip file into Templates\ProjectTemplates directory for them to use too.

I made an ASP.NET MVC template with folders, layout page, viewmodels etc arranged just how I like them.

NOTE:
If you have an empty folder in your project, it WON'T be added to the template, so I just added an empty class appropriate to each folder, and a sample picture for images folder.

like image 134
Shane Avatar answered Sep 23 '22 16:09

Shane


If you want a copy, the fastest way of doing this would be to save the project. Then make a copy of the entire thing on the File System. Go back into Visual Studio and open the copy (by right clicking on solution => add existing project => open the copied project). From there, I would most likely recommend re-naming the project/solution (Steps of Safely Renaming Project are in the following link) so that you don't have two of the same name, but that is the fastest way to make a copy.

like image 34
Mitchel Sellers Avatar answered Sep 22 '22 16:09

Mitchel Sellers