I’m working on a large Silverlight to WPF project migration and came across a issue where item templates where not being displayed from the Add new Items dialog. After a bit of searching it became apparent that this was a fairly common problem and there are a number of ways to fix the issue. Of the the various suggestions I found one seemed to work the best, although it was originally for Visual Studio 2010. So here is how you can get those missing templates back.
- Navigate to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
- Delete the ItemTemplatesCache folder
- In the ItemsTemplate folder navigate to the templates you want to display and for each template open the vstemplate file in a text editor and set ShowByDefault from false to true
- run devenv /installvstemplates
You may need to run this as an administrator. Once this is done open your project in Visual Studio and right click “Add New Item” your templates should now appear.