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.
"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."
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.
David Ramel is an editor and writer for Converge360.