According to Microsoft documentation, you are supposed to be able to just drop in custom item template zip files into your template directory and VS will automatically see them and make them available.
I was working with a third party component that I wanted to integrate into to Visual Studio. The company provided a pre-packaged Item Template zip file. I followed their instructions and dropped it in My Documents\Visual Studio 2008\Templates\ItemTemplates\Visual C# folder. I then opened my web application
and tried to create a new item based on that template.
However, the custom template was not listed:
As you can see, I have no custom templates listed. I did a bit of searching and came across several sites with some things to try:
- Run devenv /installvstemplates from the Microsoft Visual Studio 9.0\Common7\IDE folder *This command is suppose dot reinstall all of the Visual Studio provided templates
- Run devenv /setup from the Microsoft Visual Studio 9.0\Common7\IDE *This command is supposed to force VS to "sweep" your template folders and load them into VS
I tried both of these methods with no success. I even got another developer to try out the process with no luck.
I then opened up the zip file and examined the vstemplate file included. The file had identical settings to other, working templates. So what to do?
On a hunch, I tried creating a new project, only this time using the "Web Site
" project template. I then went to add a new item and behold was the custom template:
It seems as if custom item templates may only be compatible with certain project types in Visual Studio.