Visual Studio API Reference

Core APIs

Editor APIs

Access and manipulate the text editor, including syntax highlighting, code completion, and navigation.

Explore Editor APIs

Project System APIs

Interact with project and solution structures, manage build configurations, and extend build processes.

Explore Project System APIs

Debugging APIs

Extend debugging capabilities, set breakpoints, inspect variables, and control execution flow.

Explore Debugging APIs

Tool Window APIs

Create and customize tool windows to provide new UI elements and integrate custom functionality.

Explore Tool Window APIs

Extensibility & Integration

VSPackage APIs

The fundamental building blocks for creating extensions and integrating with Visual Studio.

Explore VSPackage APIs

DTE & DTE2 APIs

Automate Visual Studio actions and access its object model programmatically.

Explore DTE APIs

Command Handling

Define and manage custom commands, menus, and toolbar buttons within Visual Studio.

Explore Command Handling

Language Services

Implement custom language support, including parsing, IntelliSense, and diagnostics.

Explore Language Services

Common Use Cases

Example: Creating a Custom Tool Window

Learn how to integrate a new tool window into the Visual Studio IDE.

// Example snippet for creating a tool window
public class MyToolWindow : ToolWindowPane
{
    // ... implementation details
}
                
Learn More

Example: Programmatically Opening a File

Discover how to open documents and files using the DTE automation model.

// Example snippet for opening a file
DTE2 dte = (DTE2)ServiceProvider.GlobalProvider.GetService(typeof(DTE));
dte.ItemOperations.OpenFile("C:\\path\\to\\your\\file.txt");
                
Learn More