Table of Contents
Part I Visual Studio .NET as a Development Tool
1 The Evolution of Visual Studio .NET Moving to Visual Studio .NET
Developing for .NET
Unmanaged Development Enhancements
New Compiler Options
Updated Class Libraries
C++ Attributes
Standards Conformance
A New IDE
Visual Studio .NET Features
Editors, Designers, and Tool Windows
Visual Studio .NET File Paths
Visual Studio .NET Extensibility
Macros
Add-ins
Wizards
The Visual Studio Integration Program (VSIP)
2 Project Management in Visual Studio .NET Overview of Solutions and Projects
Understanding Solutions
Solution Items and Miscellaneous Files
Solution Properties
Solution and Solution User Options Files
Projects
Project Items
Project Properties
Project Source Files
Project Dependencies
Building Projects and Solutions
3 The Visual Studio .NET Editor Documents in the IDE
It’s All About Text
Typing and Shortcuts
The Zen of Tabs and Code Formatting
Syntax Coloring, Line Numbering, and Outlining (or, What the Compiler Saw)
Syntax Coloring
Line Numbering
Outlining
Programming Help
IntelliSense
Dynamic Help
Using the Command Window
Search, Replace, and Regular Expressions
Wildcards
Regular Expressions
Searching from the Command Window
Incremental Searching
4 Visual Studio .NET Macros 97Macros: The Duct Tape of Visual Studio .NET
Recording Visual Studio .NET Macros
Macro Commands
Editing Macros in the Macros IDE
A Simple Macro
Working with Macros
Manipulating Documents and Text
Moving Windows
Using Assemblies in Your Macros
Macro Events
Sharing Macros with Others
Exporting Modules and Projects
Turning Macros into Add-ins
Part II Extending Visual Studio .NET
5 The Add-in Wizard and the Automation Object Model The Add-in Wizard
Running the Add-in Wizard
The Add-in Project
Installing and Loading the Add-in
Debugging the Add-in
The Automation Object Model
Automation Objects
Object Model Guidelines
Automation Events
6 Add-in Architecture Writing an Add-in from Scratch
Compiling the Basic Add-in
Registering the Basic Add-in with COM
Registering the Basic Add-in with Visual Studio .NET
Add-in Events
The Add-in Event Sequence
The LifeCycle Add-in
The IDTExtensibility2 Interface
The EnvDTE Namespace
OnConnection
OnStartupComplete
OnAddInsUpdate
OnBeginShutdown
OnDisconnection
Add-in Registry Named Values
CommandPreload and the PreloadAddinState Key
LoadBehavior and CommandLineSafe
SatelliteDLLPath and SatelliteDLLName
FriendlyName and Description
AboutBoxDetails and AboutBoxIcon
7 Commands What Is a Command?
Locating Commands
Command Names
Executing Commands
Creating Macro Commands
Creating an Add-in Command
Handling a Command
Command State
How an Add-in Command Handler Is Found
The Command User Interface
The Command Bar Object Model
The Primary Command Bar
Adding a New Command Bar User Interface
Using Custom Bitmaps
Restoring a Lost Command and Its User Interface
devenv /setup
Custom Registration
Removing a Command
Command Parameters
Key Bindings
8 Managing Solutions and Projects Programmatically Working with Solutions
Creating, Loading, and Unloading Solutions
Enumerating Projects
Capturing Solution Events
Solution Add-ins
Working with Project Items
Enumerating Project Items
Adding and Removing Project Items
Working with Language-Specific Project Objects
VSProject Projects
Leveraging Visual Studio .NET Utility Project Types
Miscellaneous Files Project
Solution Items Project
Unmodeled Projects
Project and Project Item Events
Managing Build Configurations
Manipulating Solution Settings
Manipulating Project Settings
Build Events
Persisting Solution and Project Information Across IDE Sessions
9 Visual Studio .NET Wizards An Overview of Wizards
Types of Wizards
Creating the Wizard Object
Creating the .vsz File
Where to Save .vsz Files
Creating Wizard Templates
Using Template Files
Solution Filenames and the New Project Wizard
Replacements
Raw Add New Item Templates
Custom Wizards
Running a Custom Wizard Programmatically
Chaining Custom Wizards
The Wizard Helper Library
Wizard Variables
Wizard Helper Methods
Completing the WizardBuilder Sample
10 Programming the User Interface Window Basics
The Windows Collection
Using the Object Property
The Main Window
Explorer Windows and the UIHierarchy Object
The UIHierarchy Object Tree
The UIHierarchy Object
The UIHierarchyItems Object
The UIHierarchyItem Object
The Toolbox Window
Tabs and Items
Adding Items to the Toolbox
The Task List Window
Task List Items
Adding New Tasks
The TaskItem Object
Task List Events
Comment Tokens
The Output Window
Output Window Panes
The Forms Designer Window
The IDesignerHost Interface
Marshaling
Adding Controls to a Form
Finding Existing Controls
A Form Layout Sample
Creating Custom Tool Windows
Shim Controls
Setting the Tab Picture of a Custom Tool Window
Setting the Selection Object
The Options Dialog Box
Changing Existing Settings
Creating Custom Settings
11 Text Editing Objects and Events Editor Windows
The Window Object
The TextWindow and HTMLWindow Objects
The Text Pane Object
Documents
The Document Object
The TextDocument Object
Point Objects
TextPoint
VirtualPoint
EditPoint
The Text Sel ect i on Object
A Comparison of TextSelection and EditPoint
Undo Contexts
Automatic Undo Contexts
Creating Undo Contexts
Stack Linkage
The LineChanged Event
Multiple LineChanged Event Handlers
12 The Code Model Discovering Code
A Quick Tour Through a Source File
Getting a CodeElement from a Point Object
Generating Code
Building a Source File
Part III Deployment, Help, and Advanced Projects
13 Designing Setup Projects Microsoft Windows Installer (MSI) Background
Creating Custom Installation Projects
File System Editor
Registry Editor
File Types Editor
User Interface Editor
Custom Actions
Launch Conditions Editor
Merge Modules
Setup for .NET Programs .
14 Visual Studio .NET Help Navigating the Help System
Help Windows
Search and Index Options
Narrowing Search Results
Creating Custom Help Filters
Searching from the Command Window
Customizing the Dynamic Help Window
Using the XML Help Provider Service
Creating Custom Help Files
Registering Your Help Collection
15 Advanced Projects in Visual Studio .NET Visual Studio .NET from the Command Line
Building Projects and Solutions from the Command Line
Setting GUI Options at the Command Line
VSIP Options
Source Control with Visual SourceSafe
Setting Up VSS
Placing Files Under Source Control
Working with Files Under Source Control
Planning Your Solutions Carefully
Don’t Break the Build
Appendix
Code Model Reference Code Model Objects
FileCodeModel and CodeModel
CodeElement
Specialized Code Model Objects
Generating Code
Common Parameters
Main Add Methods
Other Add Methods
Remove Methods
Index