Q. VS.NET ships with a great deal of project templates. I'd like to modify all the templates on my workstation (and further, my development team) so that when a project is created (or a new class/form/webservice/control/library/etc. file), it is populated with set #region and comment declarations to make all of our code look identical. How can I do that?

Asked by reader. Answered by the Wonk on November 5, 2002

A. You should *not* modify any of the existing templates, because the next time you upgrade to a new version of VS.NET, all you changes will be in jeopardy. Instead, you should create new templates, which will still show up in VS.NET where the existing templates show up, but will be safe from the ravages of the VS.NET installer. For a description of how to build your own custom templates, I recommend reading Adding Custom Project Item Templates to VS.NET for C# Programmers or Adding Custom Project Item Templates to VS.NET for VB.NET Programmers.


I have feedback on this Ask The Wonk answer