News

Visual Studio Extensions Getting Revamp

Microsoft is changing the model for Visual Studio extensions with the goal of making them easier to write, safer to use and more cloud-friendly.

Key to the revamp is changing from an in-process model to an out-of-process model, hopefully to eliminate extension-caused crashes and corruption of the Visual Studio IDE.

Without getting too technical, a Stack Overflow post describes the difference: "An inproc server runs in the same process as the calling application. It's close to a normal function call on a dll. Calling an outproc server, data needs to be marshalled across the process boundry which is an expensive operation. An inproc server is fast but it can bring down your application."

It's that "bring down your application" peskiness that Microsoft is trying to reduce.

"Tired of seeing a feature or Visual Studio crash because of an extension?" said Leslie Richardson, program manager, Visual Studio Debugging & Diagnostics, in an Oct. 28 blog post. "Today's in-proc extensions have minimal restrictions over how they can influence the IDE and other extensions. Thus, they are free to corrupt Visual Studio if the extension experiences an error or crash. One of our biggest changes to the Visual Studio extension model is that we are making extensions out-of-proc. This will help ensure increased isolation between internal and external extension APIs, where a buggy extension can crash without causing other extensions or the entire IDE to crash, hang, or slow down along with it."

Image Optimizer extension running in a GitHub Codespace
[Click on image for larger, animated GIF view.] Image Optimizer Extension Running in a GitHub Codespace (source: Microsoft).

On the easier-to-write front, the Visual Studio extension APIs will be redesigned, hopefully becoming more uniform and discoverable, with updated documentation.

"Extensions are cool to use but can be difficult to write," Richardson said. "Inconsistent APIs, overwhelming architecture, and having to ask your teammates how to implement what should be a basic command are common feedback items from extension writers."

Finally, another goal of the revamp is to make essential extensions available both on local machines and in remote implementations such as GitHub Codespaces, which allows for custom dev environments in the cloud that can be accessed from different machines.

"The current model's unrestricted access to the IDE and lack of asynchronous APIs don't make it ideal for a seamless, crash-less, and responsive client/server experience for Codespaces. To round out our new extensibility model goals, we will make your essential extensions available both locally and remotely," Richardson said.

Microsoft is soliciting feedback on the extension experience, for which the redesign is just getting started, with a survey.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube