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."
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.