Create a File Template #88
Chapter 12, Extending Visual Studio
Create Your Own Template
Visual Studio provides a number of built-in templates for nearly all of the
file types that are involved in the different types of .NET applications. One
hack opportunity is to take one of the existing templates and just modify it
to your needs. The other opportunity is to create one from scratch, which is
what I will be covering in this hack.
Visual Studio .NET 2003 Is Missing a Template
Actually, in this hack, I’d like to make up for a hole in Visual Studio. In
addition to the Visual Studio IDE, Microsoft also offers a free tool for web
development called Microsoft ASP.NET Web Matrix, or Web Matrix for
short. The Web Matrix is a small tool that is not as fully featured as Visual
Studio. Visual Studio is able to create many more file types than the Web
Matrix. So you’d think that Visual Studio’s set of templates would definitely
be the superset of file types. Not quite. There’s an HTTP Handler file type
that appears in the Web Matrix Add New File dialog (see Figure 12-2).
Strangely enough, this is missing from Visual Studio. So let’s make up for
this disparity.
Figure 12-2. ASP.NET Web Matrix Add New File dialog

Get Visual Studio Hacks now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.