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 for Converge360.

comments powered by Disqus

Featured

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

Subscribe on YouTube