Missing an item template in Visual Studio 2005? Try this...

NOTE: This is not in reference to Web Templates. In VS2005 Web Projects are created through a different menu item.  If you here because you cannot find the web project templates make sure you select New... Web Site from the File menu.

Twice I’ve installed Visual Studio 2005 (I use the Software Developer flavor, if that matters) and in the end I’ve been missing an item template or two.

Example…  I create a new Class Library project, right click the project and choose Add.  The dialog box that appears gives me a list of installed Item Templates.  After staring at it for several minutes I decided I was missing “Class”, the template to create a new class file.  Of course I could just choose Empty file and go on… but who wants to do that.  ;-)

Here’s what I think happened.  Visual Studio has a cache on disk of all the installed item templates.  My guess is that my cache got messed up.  This didn’t just happen once however, it has happened twice now.  How do you fix it?  Well, here you go.

First, close Visual Studio.  Open a new ‘Visual Studio 2005 Command Prompt’.  Once there type the following command at the prompt, press enter and wait…

devenv /installvstemplates

This will rebuild your item and project template cache.  Works like a charm.

EDIT: This doesn't appear to be working for a lot of people.  I apologize for that.  Don't let it discourage you from trying however I do not have any other solutions.  If someone does please post and I'll include it in the article.

EDIT2: There are many good solutions in the comments below.  Read on and most likely you will find your solution.

This article is part of the GWB Archives. Original Author: Eric Hammersley

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.