News

Microsoft Furthers Visual Studio Extension Writing Revamp

Microsoft this week announced VisualStudio.Extensibility, its latest effort to revamp the authoring process for Visual Studio extensions.

That revamp effort started almost a year ago with a new multi-prong extension writing experience for Visual Studio 2022.

As Microsoft announced at the time, various efforts included a new public VSExtensibility repo acting as a go-to destination for extension-related announcements, code samples and documentation on preview features; offering extensions to the Language Server Protocol functionalities; and easier extension writing with the Visual Studio Community Toolkit.

Microsoft called those initiatives "phase 1" of the extension revamp.

This week, it announced phase 2.

"This new model will make extensions easier to write and more reliable along with additional benefits such as being able to install these extensions without restarting the IDE," said Microsoft's Leslie Richardson in an Aug. 10 blog post. "Now, we're excited to announce the second phase of the new extensibility model, now titled VisualStudio.Extensibility!"

She said that while phase 1 enabled editor APIs that enabled developers to create linter and formatter extensions, new VisualStudio.Extensibility APIs let them write richer, non-language-based productivity extensions.

For example, the WPF-based Remote UI framework can be used to add UI constructs via UI-based extensions.

Sample Code for Creating a Tool Window
[Click on image for larger view.] Sample Code for Creating a Tool Window (source: Microsoft).

"Using the new Remote UI framework, extensions can now provide custom tool windows," Richardson said. "Tool windows can be registered with a default placement (such as floating in the document well, relative to other VS tool windows) and auto-creation (allowing the window layout to recreate and show the tool window when needed). Additional support is included for using context rules to dynamically show and hide a tool window. also new extensibility APIs for finding, showing, and hiding these tool windows. All the new tool window behaviors are set up to be asynchronous including getting the tool window's properties and content."

Tool Window Example in Animated Action
[Click on image for larger, animated GIF view.] Tool Window Example in Animated Action (source: Microsoft).

Richardson also listed new editor API additions:

and new commands:

  • Display Tooltips:Developers can write an extension that displays additional information in the form of a tooltip when hovering over a feature or control in Visual Studio.
  • Show custom images: Developers can further personalize extensions by referencing their own custom images -- that is, images outside the list of known VS monikers -- in their extension commands.

Other improvements include task progress notifications and smoother migration with in-proc support. About the latter, Richardson said: "In addition to out-of-proc support for writing more reliable extensions, phase 2 of VisualStudio.Extensibility now includes in-proc support. Enabling in-proc APIs will allow you to migrate your existing extensions in manageable chunks. Even if you don't have an existing extension, this support will let you fill in API gaps that the VisualStudio.Extensibility model does not yet support but are essential to your extension scenarios."

Going forward, more useful scenarios are planned for phase 3.

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