Extension changes in Visual Studio 2022

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Anyone that has worked in any Visual Studio integrated development environment (IDE) has at, one point in time, worked with an extension. Extensions are add-ons to Visual Studio that allow developers to customize and enhance their experience in Visual Studio by adding new features and integrating existing tools. An extension’s main purpose is to increase productivity and cater to developers’ workflow.

Improvements to Visual Studio 2022 Extensions

Some improvements of Extensions in Visual Studio include the following:

  • VSExtensibility repository on GitHub
  • Language Server Protocol (LSP)
  • Visual Studio Community Toolkit
  • Out-of-Proc Extensibility Model

Let’s have a closer look at each.

VSExtensibility repository on GitHub

Visual Studio GitHub Extension

Microsoft created a public GitHub repository, to host all the new Extensibility developments. This repo also serves as a destination for any extension-related code samples, announcements, documentation, and preview features.

The public GitHub repository can be found here.

Language Server Protocol (LSP)

The Language Server Protocol defines a set of JSON-RPC (Remote Procedure Call Protocol encoded in JSON) request, response, and notification messages. These functionalities let developers leverage capabilities specific to Visual Studio and servers.

The NuGet package can be downloaded here.

Some more documentation on the Language Server Protocol can be found here.

Visual Studio Community Toolkit

Writing a Visual Studio extension has always been tough because of numerous such as hard-to-discover, dated APIs, inconsistent, inaccurate documentation, and lack of best extensibility practices. Because of this, Microsoft created the Visual Studio Community Toolkit.

The Visual Studio Community Toolkit is a set of project templates, API wrappers, as well as productivity tools driven by the community.

To get started have a look at the VSIX Cookbook. Here you can pick your starting point (based on your experience level).

To install the extensibility workload, have a look here.

Out-of-Proc Extensibility Model

With the new Out-of-Proc Extensibility Model you can write securer and more reliable extensions. With the older Extension model, extensions crashing Visual Studio, security, incomplete and inconsistent documentation, restarting Visual Studio were common problems.

The new extensibility model loads extensions out-of-process which allows for more reliability when it comes to Visual Studio crashing or hanging. It makes extensions easier to write with more cohesive APIs and documentation.

Another benefit is that the installation of out-of-proc extensions does not need a restart of Visual Studio.

This new Out-of-Proc extensibility model is, according to Microsoft, a long, ongoing project. This means that it won’t be available at full feature parity and general consumption by the end of VS 2022’s release cycle.

To get started with Out-of-Proc Visual Studio Extensions, have a look here.

Hannes DuPreez
Hannes DuPreez
Ockert J. du Preez is a passionate coder and always willing to learn. He has written hundreds of developer articles over the years detailing his programming quests and adventures. He has written the following books: Visual Studio 2019 In-Depth (BpB Publications) JavaScript for Gurus (BpB Publications) He was the Technical Editor for Professional C++, 5th Edition (Wiley) He was a Microsoft Most Valuable Professional for .NET (2008–2017).

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read