33

After creating a solution for a project, I exported it as a template. Now after exporting it automatically adds the template to my IDE and creates a ZIP file with all the project files and a .vstemplate extension file.

Now i am on another computer with visual studio and i wish to load this template and save it in the IDE, but i cannot find this option anywhere. The temporary solution i have is to open an empty web application and copy all the contents of the ZIP file not including the .vstemplate file. So my question is how can i load this template into my IDE?

When opening the vstemplate file in Visual Studio all i get is a text editor and XML data.

I am using Visual studio 2013 with Update 4.

Bodokh
  • 976
  • 4
  • 15
  • 34

2 Answers2

50

Once you've exported your template, copy the entire ZIP file that was created to the folder C:\Users\[User Name]\Documents\Visual Studio 2013\Templates\ProjectTemplates. (You might want to use one of the provided subdirectories to keep your template organized.)

Restart Visual Studio, and then use the search bar in the New Project dialog to help you find the project template you just added.

bbsimonbb
  • 27,056
  • 15
  • 80
  • 110
Milliron X
  • 1,174
  • 14
  • 26
  • I have a folder called Visual studio 12.0 but not 2013, and inside i have a folder called Item Templates but no templates or Project templates anywhere. – Bodokh Dec 09 '14 at 16:06
  • The `Visual Studio 2013` folder is going to be in your `Documents` folder. I'm guessing that you're looking in the `Program Files` or `Program Files (x86)` folder. – Milliron X Dec 10 '14 at 04:14
  • I know this is kind of late, but my folder was as follows: `C:\Users\[User Name]\Documents\Visual Studio 2013\My Exported Templates` and putting the zip file in there worked for me. – Sal Alturaigi Aug 14 '17 at 13:11
  • 1
    so many places only discussed how to import *while exporting* your own. Incredible that this is the only place that talked about importing someone else's zip. I guess templates just aren't used all that much. – Don Cheadle Jan 09 '18 at 16:18
  • @SalAlturaigi the template is created in the My Exported Templates but the option to import it (to the Project Templates folder) is ticked by default. So you probably have the template in both places and it is actually importing it from the Project Templates folder. – Ant May 13 '19 at 13:39
12

For the record, it looks like using templates changes with VS2017. Your project template provider will have to publish via a new build mechanic, and it'll be a bit different than just dumping a .zip into a user folder:

Using Project/Item Templates: https://learn.microsoft.com/en-us/visualstudio/extensibility/upgrading-custom-project-and-item-templates-for-visual-studio-2017

Create Project/Item Template: https://learn.microsoft.com/en-us/visualstudio/extensibility/creating-custom-project-and-item-templates

  • Thanks for the links: Create your own template, and it's a zipped file according to the second link. From the first link under **Other Recommendations for Deploying Project and Item Templates** there is: _Avoid using zipped template files_... – Laurie Stearn Jan 01 '18 at 12:17
  • 1
    Thanks for the links and letting us know that VS 2017 follows a different process! – Chris Mar 20 '18 at 20:36
  • 1
    I actually managed to get a template zip file in `C:\Users\xxxx\Documents\Visual Studio 2017\Templates\ProjectTemplates` to show in the New Project area – Matthew Oct 10 '19 at 09:48