Shipping a VS Code extension backed by a .NET Tool based analyzer

Presented on the dotnet channel, this talk walks through the architecture and deployment of the T-SQL Analyzer VS Code extension. It focuses on connecting an existing .NET analysis engine to an editor without requiring a build step or manual tool installation.

Architecture: a thin editor layer over a .NET engine

The extension exposes more than 140 T-SQL analyzer rules written in C# on top of DacFx. Rather than porting those rules to TypeScript, it uses a thin TypeScript front-end to connect VS Code to a long-lived .NET backend.

The presenter built the front-end without previous TypeScript experience. The approach keeps the analysis logic in the existing .NET library while using the extension to provide the editor experience.

Communication and process lifecycle

The front-end and backend communicate through a simple JSON protocol over standard input and standard output. The talk covers designing that protocol to be minimal and robust, alongside managing a persistent analyzer process.

Process supervision includes:

Distribution and live diagnostics

The backend is distributed as a NuGet tool and run through dnx. Users need the .NET 11 SDK, but do not need to install the analyzer tool manually.

The extension turns analysis results into live editor diagnostics as developers type, with no build step. The talk also addresses error handling and presenting useful feedback when something goes wrong.

The broader pattern is reusable: keep an existing .NET engine responsible for its technical work, and place a thin editor integration over it to handle communication, process lifecycle, and diagnostics.