Flush the Visual Studio Template Cache

After my last blog post about adding Spark to an ASP.NET MVC 2 project, I decided to create a project template that uses Spark instead of the default Web Forms view engine.

However, even though I added my new template to the Visual Studio project template folder, it still did not turn up in the project list when I wanted to create a new project.

What you have to do is to flush the Visual Studio Template Cache, which will make Visual Studio update the list of project templates that are available. It is really easy to do.

In the command prompt, just execute the following:

   devenv /installvstemplates

If your command prompt does not find devenv, just navigate to the .exe file, for instance:

   C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>

After doing so, just choose to create a new project in Visual Studio and the template should appear in the list.