I have created an Item Template using the "Export Template" wizard. I opened up the XML file and made a couple of minor changes, then rezipped the package. Then I checked the item template into source control so that everyone on the team can access it if they want.
But for the life of me I can't get the template to show up under My Templates when I go to Add->New Item.
I have tried copying the zip file into every conceivable directory:
But nothing shows up. Has anyone else managed to distribute Item Templates to their team mates before?
The default location is %USERPROFILE%\Documents\Visual Studio <version>\Templates\ItemTemplates. Close Visual Studio and then reopen it. Create a new project, or open an existing project, and then choose Project > Add New Item or press Ctrl+Shift+A. The item template appears in the Add New Item dialog box.
By default, user templates are located in: %USERPROFILE%\Documents\Visual Studio 2019\Templates\ProjectTemplates. %USERPROFILE%\Documents\Visual Studio 2019\Templates\ItemTemplates.
To do so: Open Visual Studio IDE>>Tools>>Options>>Projects and Solutions>>General>>Change “User project templates location” to My Templates folder. You also can export settings of Visual Studio on first server via Tools>>Import and Export Settings…>> Export selected environment settings.
In order to have a VS item template appear, you need to make sure that you run "devenv.exe /installvstemplates" after you have copied the .zip file containing your .vstemplate and template code file into the %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\<Project Type> folder.
I've found that it's useful to wrap the whole thing up into an MSI that discovers the VS9 path, copies the Item/Project template to the necessary folder, and calls a custom action that shells out to devenv.exe passing the "/installvstemplates" switch. That way your colleagues just need to install the package and they are up and running!
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With