Reorganize the Default Project Templates
Versions: 2008,2010
Published: 11/7/2010
Code: vstipProj0018
WARNING: Everything I'm about to show you could cause some of your templates to disappear if you don't FOLLOW THE INSTRUCTIONS CAREFULLY. So do this at your own risk.
Maybe it's just me but I get really annoyed that, for example, my WCF project templates are in a WCF section when I go to create a new project but my WPF projects are under "Windows". What's up with that? So I'm going to show you how you can create custom areas for your default project templates that come with Visual Studio. In this example, we will create a WPF area for our WPF project templates.
Navigate to C:\Program Files\Microsoft Visual Studio <version>\Common7\IDE\ProjectTemplates\<language>. You will probably have to dig deeper depending on what you are after and the path may be slightly different based on Visual Studio version. In this case the actual full path on my machine to CSharp is "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp":
Now create a new folder called "WPF":
This next parts are the dangerous parts so BE CAREFUL. Okay. Now, go into the Windows folder (actually Windows\1033\) and locate the WPF templates:
Very, VERY carefully move these .ZIP files into the new directory you just created:
Close all instances of Visual Studio and then run the following command from the Visual Studio Command Prompt: "devenv.exe /installvstemplates"
While it is running it is VERY important that you let it finish. It will run devenv.exe without any interface so you should bring up the Task Manager (CTRL + ALT + DELETE) and watch the process until it disappears from the process list:
When it is done, open up Visual Studio and go to the New Project dialog (CTRL + SHIFT + N). Notice your brand new WPF area with your templates inside it:
SIDE NOTE: While researching how to do this I experimented with copying instead of moving the templates. Apparently Visual Studio detects duplicate template names and doesn't allow you to do it. So I wound up with an empty WPF section and the templates stayed in the Windows section. I suspect is has to do with order of load so and my tests indicate VS loads the known default directories first so having a folder called "Abacus" to beat the sort order doesn't work.