Bryan Soltis

Senior Software Engineer
MCPD: Enterprise Application Developer 3.5
MCSD.NET, MCAD, MCP

Visual Studio 2008 Custom Item Templates Not Showing Up

Wednesday, March 11, 2009 08:08 | posted by: bryan

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.

 

Tags: ,

PermaLink   E-Mail Article   RSS Comment Feed  

Comments

April 8. 2009 14:20

Aristotle Ford

Great Article! I am having styling issues with VS 2008 also. It seems as though my custom style sheet is not being fully applied. To make matters worse, I cannot control the position of my Divs because VS is forcing me to use its Style Builder - making my pages look slightly inconsistent *sign*. Still working on it...

Aristotle Ford United States

May 5. 2009 19:32

Justin

I was having a similar problem. However, I ran across the Code Kindler's article on multi-file templates (blog.joubin.ca/.../...studio-2008-multi-file.html) and I was able to successfully create a register a multi-file web control template for Visual Studio 2008. The gist of his method is to wrap the item zip file that you described in a VSTemplate - a second ZIP file wrapping the first together with a Visual Studio Content Installer (.vscontent) file and then renamed with the extension .vsi.

Justin United States

May 11. 2009 16:43

prabhakar singh

This issue is with professional edition, try to install developer edition, may be you will get all the templates.

prabhakar singh India

July 14. 2009 17:08

Dink

The only way I have been able to get a Linq To SQL class to show in my VisualCSharp --> Database --> SQL Server Project or Other Project Types --> Database --> Database projects was to do the following:

1. Create a bogus Web Application project
    a. Remember the path to where the project folder will be created
2. Do your normal "Add New Item" routine to this project
    a. You'll be selecting the Visual C# --> Data --> [WHATEVERITEMYOUWANT] from the dialog box
3. Save this project and then close the solution
4. Open your original database project
5. This time choose "Add Existing Item"
   a. Browse to the web application you created and hunt down the item you added to it.
   b. For Linq To SQL classes you'll want to add the *.dbml file to it.
   c. Step 5b will cause it automatically load the O/R mapping designer

Also, I checked the Microsoft webstore in regards to a Developer Edition of VS 2008 and this does not exist. There is a Team System Development Edition which is roughly $2k to $5k in price. GO here to see the versions that MS sells: www.microsoft.com/.../default.mspx

I don't know if other editions automatically shows these item templates in the database project types but this work around is the cheapest for me by far!

Dink United States

August 31. 2009 20:32

bonus dei casinò virtuali

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

bonus dei casinò virtuali India

March 5. 2010 11:08

huntsville web design

The directory structure is just a bit different. If you want to change a current template check out C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp and if you'd like to add your own as we've done in this example check out C:\Documents and Settings\ISuttle\My Documents\Visual Studio 2008\Templates (changing ISuttle of course). These are default locations which you can alter/view in Tools > Options > Projects and Solutions.

huntsville web design

April 18. 2010 01:53

adelaide web design

How do you add multiple design templates for Powerpoint?

adelaide web design

Add comment


(Will show your Gravatar icon)
Click to change captcha
biuquote
  • Comment
  • Preview
Loading