Visual Studio Copy Project

前端 未结 12 798
暗喜
暗喜 2020-12-04 07:02

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 deploy

12条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 07:26

    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.

提交回复
热议问题