

The Future of Visual Studio Extensions
source link: https://devblogs.microsoft.com/visualstudio/the-future-of-visual-studio-extensions/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The Future of Visual Studio Extensions

Leslie
October 28th, 2020
With new improvements and additions such as GitHub Codespaces, Git Integrations, and IntelliCode Team Completions, Visual Studio has expanded to make development easier, more customizable, and accessible from any machine. As we continue evolving Visual Studio, what about extensions?! While still early in the design phase, we are creating a new extensibility model. This will make extensions more reliable, easier to write, and supported locally and in the cloud.
Crash Less, Code More!
Tired of seeing a feature or Visual Studio crash because of an extension? 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.
Easy to Write
Extensions are cool to use but can be difficult to write. 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. Discovering all these APIs can be challenging and once you do find them, it can be hard to know where or when to use them. Luckily, designing the new out-of-proc extension model gives us the opportunity to completely redesign the Visual Studio extension APIs. So, our goal is making writing extensions easier with more uniform, discoverable APIs and continually updated documentation. Most importantly, the new model will preserve the power and extensive UI customizability options that today’s model provides.
Figure 1 shows the code required to initialize a command for Mads Kristensen’s Image Optimizer extension. Figure 2 shows an example of what initializing the same command could look like using the new model. Here, lines 31 and 32 in Figure 2 condenses and represents Figure 1’s AddCommand method calls. Figure 1’s DesignTimeEnvironment code (DTE) representing the IDE and its controlling methods is passed in via the VisualStudioExtensibility class in Figure 2. Ideally, this simplifies the code and knowledge required to properly initialize the class.
Figure 1: Initialization code for Image Optimization command using existing extension modelFigure 2: Example of possible Image Optimizer command initialization using new extension model
Extensions in the Cloud
Part of GitHub Codespaces’ appeal is the ability to have a customized dev environment accessible via the cloud across machines. For many developers, a customized environment is incomplete without extensions. 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.
Figure 3: Image Optimizer extension running in a GitHub CodespaceThe Future
The road to completing the new extension model is a long one and today’s model will not be replaced overnight. We are still in the conceptual phases of this new model, so sharing your experiences as either an extension user or an extension writer is very important. To help us improve the extension experience, please share in the comments what extensions you can’t live without or complete this survey.
Stay tuned for future extension developments!
Leslie Richardson
Program Manager, Visual Studio Debugging & Diagnostics
Follow
Recommend
-
210
Page not found – theinfogrid.com
-
82
The Visual Studio Code team continues to add Java functionality to Microsoft's open source, cross-platform code editor via extensions, just launching a new batch for working with Maven, Tomcat and Checkstyle.
-
55
VSCode (Visual Studio Code) has exploded in popularity since its first release in 2015 and has now become the editor of choice for many web developers, especially those working with JavaScript on the frontend and Node.js...
-
40
Visual studio code is my go-to editor for programming. Due to its wide range of extensions and support from Microsoft this editor is widely adopted. Visual studio code is built on top of open source Monaco editor...
-
47
As a developer, you want to be efficient with your time and automate where you can. Here are 15 VS Code extensions you should be taking advantage of today. Visual Studio Code is one of the most popular IDEs avail...
-
18
10 Top Visual Studio Extensions in 2020 Recommended VS Code extensions
-
11
Dec 2, 2019 - 11 minute read - Comments - Burp
-
14
Live in 2 daysJanuary 9, 6:00 AM ...
-
8
Description The challenge was great: do a review of the Best #VisualStudio Code extensions to work for #Azure. In this episode of All Around Azure, Brian Clark is joining me to introduce Visual Studio Code and review...
-
14
Live in 44 hoursMarch 26, 9:00 PM ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK