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

comments powered by Disqus

Featured

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

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube