Skip to Content
Visual Studio Hacks
book

Visual Studio Hacks

by James Avery
March 2005
Intermediate to advanced
304 pages
19h 23m
English
O'Reilly Media, Inc.
Content preview from Visual Studio Hacks
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mastering Visual Studio .NET

Mastering Visual Studio .NET

Chris Sells, Ian Griffiths, Jon Flanders
C# 4.0 Unleashed

C# 4.0 Unleashed

Bart De Smet
Programming in the .NET Environment

Programming in the .NET Environment

Damien Watkins, Mark Hammond, Brad Abrams

Publisher Resources

ISBN: 0596008473Errata Page