
382
Chapter 12
CHAPTER TWELVE
Extending Visual Studio
Hacks 86–91
Much of this book has been about extending Visual Studio, but this chapter
specifically covers the objects and API used to directly interact with the
Visual Studio environment. Visual Studio includes a rich automation object
model that can be used to interact with just about every part of Visual Stu-
dio.
The hacks in this chapter cover the Visual Studio automation object model,
its various classes and how they can be used, how to reference the DTE
assembly from outside of Visual Studio, and how to add a new file template
to Visual Studio.
This chapter also covers how to write and install Visual Studio add-ins, as
well as how to find commands in Visual Studio and create a custom icon for
your add-in.
HACK
#86
Automate Visual Studio Hack #86
Reach into Visual Studio and pull all its strings with the Visual Studio
automation object model.
The Visual Studio automation object model provides an interface for you to
develop macros, add-ins, and other tools that access and manipulate the
Visual Studio environment. Using this object model, you can access and
change just about every part of Visual Studio.
In this hack, you will learn about the object model and some of the more
useful tasks that can be automated using it. In this hack, I will not be focus-
ing on macros
[Hack #51], add-ins [Hack #89], wizards [Hack #88], or any of the other
ways that ...