
394
|
Chapter 12, Extending Visual Studio
#88 Create a File Template
HACK
|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4533
|0|HTTPHandler.ashx
Although it is broken up here, all code should appear on one line in the text
file. These entries have up to nine parts. Let’s look at the VB.NET code as an
example.
The first part (
..\VBNETHTTPHandler.vsz) is the relative path to the .vsz file
for the template. The second part (the space between the | and |) is optional
and left blank in this example.
The third part (
HTTP Handler) contains the words that go under the icon for
the template in the Add New Item dialog, so keep it short.
The fourth part (
15) is important; it’s known as the SortPriority. It deter-
mines the order in which the templates appear in the dialog. The ones
included with Visual Studio start with 10 and continue in increments of 10.
For example, the next template that normally appears is the WebService
template. It has a
SortPriority of 20. I use 15 so that this one shows up
between these two.
The fifth part (
VSNet Hacks HTTPHandler) is the description that appears in
the box of the same dialog when you click on the icon. You’ll have a little
more room for this, but not much; it has to fit on a single line.
The sixth and seventh (
{164B10B9-B200-11D0-8C61-00A0C91E29D5} and 4533)
parts have to do with the icon that’ll be used in the dialog to represent this
custom template. The sixth part is the DLL ...