Visual Studio: Restore Missing Templates

Symptom: You cannot add a new project or an item in Visual Stuio IDE.

Problem: Open the Event Viewer (Control Panel->Administrative Tools->Event Viewer) and see if the suggestion says “Run devenv.exe /installvstemplates”. If this is the case, then the problem is the template files are missing.


1. Close all instances of Microsoft Visual Studio.

2. There are two folders under IDE folder (C:\Program Files\Microsoft Visual Studio xx\Common7\IDE), namely ProjectsTemplateCache and ItemsTemplateCache. Delete these two folders. Yes, I said, delete. If you are hesitant, don’t worry, it will go to the recycle bin from where you can retrieve them.

3. After deleting the folders, open the command prompt and run this command: Devenv /InstallVSTemplates .

4. Done. The template files should be restored and you should be able to add new projects and items.

I found myself in this situation out of nowhere. I was innocently coding and debugging and when I tried adding a control to my project, I suddenly see this error message. Thank God, the solution was this simple. Imagine spending another 4 hours on reinstalling Visual Studio. I wonder why I got into this situation, in the first place. Any idea?

Tagged , ,

4 thoughts on “Visual Studio: Restore Missing Templates

  1. Andrey says:

    Thanks, realy helpfull=)

  2. I found out alternate solution,
    1. Go to Tools –> Options
    2. Under Projects and Solutions change the default value to
    a. User Project Template Location –> c:\program files\microsoft visual studio 10.0\Common7\IDE\ProjectTemplates
    b. User item Template Location –>
    c:\program files\microsoft visual studio 10.0\Common7\IDE\ItemTemplates

    And That’s it Hope it works.

  3. Alyce says:

    With proper research you will be talking about your vacation for years
    and years, it’s likely you will be going back again. Most people love travelling to different places and
    would like to explore. On the heels of the president’s initiative to extend broadband services to the most rural
    areas of the nation combined with the push for green-centric services, organizations
    must be concerned with fuel consumption and
    associated emissions expended when deploying technology on a multi-site national
    or international scale.

  4. Although such professionals are expending added pre-operation time,
    they do find that they’re in fact wasting less time with post surgical problems, for the reason that the patient has previously been told, comprehensively, what to look ahead to.
    In 1982, he published his first book, The Agony of De-Feet: A Podiatrist Guide
    to Foot Care. Pregnant women and people enrolled in the
    Breast or Cervical Cancer treatment program do not pay co-pays.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: