{"id":247272,"date":"2024-02-20T09:20:17","date_gmt":"2024-02-20T17:20:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=247272"},"modified":"2024-02-20T09:37:26","modified_gmt":"2024-02-20T17:37:26","slug":"visualstudio-extensibility-17-9","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/visualstudio-extensibility-17-9\/","title":{"rendered":"VisualStudio.Extensibility: Install extensions without restarting Visual Studio!"},"content":{"rendered":"<p>The new VisualStudio.Extensibility SDK helps you build extensions that run outside of the main IDE process for improved performance and reliability. With a focus on developer productivity, it features a modern, intuitive .NET Core-based API and solid, well-maintained documentation.<\/p>\n<p>This public preview release builds on our <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visualstudio-extensibility-preview-3\/\">previous<\/a> developer previews, and it brings with it the highly-requested ability to publish your new extensions in the Visual Studio Marketplace and share them with customers. We\u2019ve introduced some great new features that will make it easier to configure your extensions, query the project system, and create powerful debugger visualizers. Also with this release, we\u2019ve strengthened our plans to keep our core API stable across releases, and we\u2019ve explicitly marked APIs that may change to help developers create extensions with confidence.<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\" target=\"_blank\">Get Started with VisualStudio.Extensibility Preview<\/a><\/div><\/p>\n<p>Please visit <a href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\">https:\/\/aka.ms\/VisualStudio.Extensibility<\/a> for up-to-date docs and installation instructions. If you\u2019d like to report bugs or suggest features, please use the <a href=\"https:\/\/github.com\/microsoft\/VSExtensibility\/issues\">issue tracker<\/a> on our <a href=\"https:\/\/github.com\/microsoft\/VSExtensibility\/\">GitHub repo<\/a>, where you can also find extension <a href=\"https:\/\/github.com\/microsoft\/VSExtensibility\/tree\/main\/New_Extensibility_Model\/Samples\">samples<\/a> to help you get started.<\/p>\n<p>&nbsp;<\/p>\n<h3>What\u2019s new for VisualStudio.Extensibility?<\/h3>\n<p>This release of VisualStudio.Extensibility expands your ability to create powerful productivity extensions, with features including:<\/p>\n<ul>\n<li><a href=\"#post-247272-_Publish_your_extensions_1\">Publish your extensions in the Visual Studio Marketplace<\/a><\/li>\n<li><a href=\"#post-247272-_Hot_loading:_Install\">Hot loading: Install extensions without restarting Visual Studio<\/a><\/li>\n<li><a href=\"#post-247272-_Configure_your_extension_1\">Configure your extension easily with configuration properties<\/a><\/li>\n<li><a href=\"#post-247272-_Create_dockable_\">Create dockable custom data visualizers for better debugging<\/a><\/li>\n<li><a href=\"#post-247272-_Add_Language_Server\">Add Language Server Protocol (LSP) support to your extension<\/a><\/li>\n<li><a href=\"#post-247272-_Query_the_project\">Query the project system with the enhanced query API<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h5><a id=\"post-247272-_Publish_your_extensions_1\"><\/a>Publish your extensions in the Visual Studio Marketplace<\/h5>\n<p>With customer downloads in the millions, the Visual Studio Marketplace is the best place to share and find amazing Visual Studio extensions. Starting with this release of VisualStudio.Extensibility, you can now <a href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\/Publish\">publish your extensions<\/a> in the Visual Studio Marketplace!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-description-automatica.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-description-automatica.png\" alt=\"A screenshot of the Visual Studio Marketplace with the &quot;Publish Extensions&quot; link surrounded by a red box.\" width=\"2027\" height=\"456\" class=\"aligncenter size-full wp-image-247274\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-description-automatica.png 2027w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-description-automatica-300x67.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-description-automatica-1024x230.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-description-automatica-768x173.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-description-automatica-1536x346.png 1536w\" sizes=\"(max-width: 2027px) 100vw, 2027px\" \/><\/a><\/p>\n<p>Building a VisualStudio.Extensibility-based extension in Visual Studio now produces a standalone VSIX package. You can share your VSIX locally to enable others from your team or organization to install it directly, and you can also publish it in the Marketplace to reach the largest audience of Visual Studio users.<\/p>\n<p>We can\u2019t wait to see your new extensions on the Marketplace!<\/p>\n<p>&nbsp;<\/p>\n<h5><a id=\"post-247272-_Hot_loading:_Install\"><\/a>Hot loading: Install extensions without restarting Visual Studio<\/h5>\n<p>With VisualStudio.Extensibility, you can finally install new extensions without closing and restarting Visual Studio! This has been one of the most requested features by users, and we\u2019re excited to deliver it! For example, suppose you\u2019re having some trouble debugging a complex regular expression. You can go to the Marketplace using the Extension Manager to find and install our new VisualStudio.Extensibility-based <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vsext.RegexMatchVisualizer\">Regex Match Debugger Visualizer<\/a>, and start using it immediately to nail your regex.<\/p>\n<p>This streamlined installation, called hot loading, works for any out-of-process extensions written using VisualStudio.Extensibility. We\u2019re also working to add a visual indicator to extensions in the Marketplace that support hot loading to make it easy for you to identify. We\u2019ll share updates as we have them!<\/p>\n<p>Extensions are installed alongside your Visual Studio installation by the Visual Studio installer, which will be a familiar process to all of you who take advantage of our exciting new support for <a href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\/vsconfig\">installing extensions automatically using a .vsconfig file<\/a> when you set up a new machine or Visual Studio installation. Users who don\u2019t have admin permissions can take advantage of our <a href=\"https:\/\/learn.microsoft.com\/visualstudio\/install\/configure-policies-for-enterprise-deployments?view=vs-2022#controlling-installation-download-and-update-behavior\">AlllowStandardUserControl policy<\/a> to help with extension installation.<\/p>\n<p>&nbsp;<\/p>\n<h5><a id=\"post-247272-_Configure_your_extension_1\"><\/a>Configure your extension easily with configuration properties<\/h5>\n<p>Building on our <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visualstudio-extensibility-preview-3\/#configure-your-extension\">configuration properties<\/a> for extension components like commands, you can now configure your extensions directly in code. With strongly-typed classes and properties, you can use IntelliSense to quickly find and fill in the required and optional values for configuring an extension.<\/p>\n<p>Before, you needed to manually maintain a separate VSIX manifest file, but with the improvements in the latest release, extension configuration is done seamlessly inside your source code:<\/p>\n<pre class=\"prettyprint language-cs language-csharp\" style=\"padding-bottom: 0px; margin-bottom: 0px;\"><span style=\"font-size: 8.5pt;\"><code class=\"language-cs language-csharp\">public override ExtensionConfiguration ExtensionConfiguration =&gt; new()\r\n  {\r\n      Metadata = new(id: \"MyExtension.ae8b86e5\", version:this.ExtensionAssemblyVersion,\r\n          publisherName:\"My Publisher\", displayName:\"My Extension\")\r\n      {\r\n          Description = \"A VisualStudio.Extensibility extension to demonstrate configuration properties.\",\r\n          License = \"LICENSE.txt\",\r\n          Icon = \"icon.png\",\r\n          PreviewImage = \"previewImage.png\",\r\n          Tags = new[] {\"Build\", \"Productivity\", \"C#\"},\r\n          MoreInfo = \"https:\/\/aka.ms\/VisualStudio.Extensibility\"\r\n      }\r\n  };\r\n<\/code><\/span><\/pre>\n<p><span style=\"font-size: 10pt;\">Sample code for configuring an extension<\/span><\/p>\n<p>Together, configuration properties not only allow you to control how parts of your extension, like commands, behave, but also how your extension itself gets activated by Visual Studio. When you build your project, Visual Studio will use this configuration to create a VSIX for your extension, which you can share or publish to the Marketplace.<\/p>\n<p>&nbsp;<\/p>\n<h5><a id=\"post-247272-_Create_dockable_\"><\/a>Create dockable custom data visualizers for better debugging<\/h5>\n<p>Debugger visualizers enable you to provide Visual Studio users with clear, insightful visualizations of complex data types to help improve their debugging workflows. With VisualStudio.Extensibility, you can now create non-modal\/dockable debugger visualizers in tool windows that you can dock or float around the IDE.<\/p>\n<p>For example, here\u2019s our Regex Match Debugger Visualizer docked with the other debugging tool windows:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-program-description-au.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-program-description-au.png\" alt=\"A screenshot of the Regex Match Debugger Visualizer docked with the other debugging tool windows.\" width=\"1171\" height=\"719\" class=\"aligncenter size-full wp-image-247275\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-program-description-au.png 1171w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-program-description-au-300x184.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-program-description-au-1024x629.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/a-screenshot-of-a-computer-program-description-au-768x472.png 768w\" sizes=\"(max-width: 1171px) 100vw, 1171px\" \/><\/a><\/p>\n<p>Together with <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visualstudio-extensibility-preview-3\/#create-custom-data-visualizers\">the modal debugger visualizers<\/a> from the previous release, you now have the flexibility to design powerful visualizers for any debugging scenario! To learn more about debugger visualizers, please visit <a href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\/DebuggerVisualizers\">the debugger visualizer documentation<\/a>. To find code samples, visit our <a href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\/Samples\">samples repo<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h5><a id=\"post-247272-_Add_Language_Server\"><\/a>Add Language Server Protocol (LSP) support to your extension<\/h5>\n<p>Beginning with this version of VisualStudio.Extensibility, you\u2019ll be able to begin integrating LSP into your extensions. With this support, you can create a language server provider, and use it to activate and interact with a language server.<\/p>\n<p>Language server providers also support configuration properties, which can be used to control which file types the language server applies to. For example:<\/p>\n<pre class=\"prettyprint language-cs language-csharp\" style=\"padding-bottom: 0px; margin-bottom: 0px;\"><span style=\"font-size: 8.5pt;\"><code class=\"language-cs language-csharp\">public override LanguageServerProviderConfiguration LanguageServerProviderConfiguration =&gt; new(\r\n      \"%RustLspExtension.RustLanguageServerProvider.DisplayName%\",\r\n      new[] \r\n      { \r\n          DocumentFilter.FromDocumentType(RustDocumentType) \r\n      });\r\n<\/code><\/span><\/pre>\n<p><span style=\"font-size: 10pt;\">Sample code for creating a language server provider<\/span><\/p>\n<p>We\u2019ve added a <a href=\"https:\/\/github.com\/microsoft\/VSExtensibility\/blob\/main\/New_Extensibility_Model\/Samples\/RustLanguageServerProvider\/README.md\">sample<\/a> to our <a href=\"https:\/\/github.com\/microsoft\/VSExtensibility\/tree\/main\/New_Extensibility_Model\/Samples\">samples repo<\/a> that creates a language server provider for Rust, and uses that it to power IntelliSense and tooltips when you open a Rust file.<\/p>\n<p>VisualStudio.Extensibility and LSP together is a powerful integration, and we need your help. Please experiment with your own language servers and send feedback about which additional features you require for your extension.<\/p>\n<p>&nbsp;<\/p>\n<h5><a id=\"post-247272-_Query_the_project\"><\/a>Query the project system with the enhanced query API<\/h5>\n<p>With the previous release, we added support for querying the project system, which you could use to search for projects that met certain criteria or to modify projects. This release adds many additional features, including:<\/p>\n<ul>\n<li>\n    New project actions:<\/p>\n<ul>\n<li>\n        Build\n      <\/li>\n<li>\n        Reload\/Unload\n      <\/li>\n<li>\n        Rename\n      <\/li>\n<li>\n        Save\n      <\/li>\n<\/ul>\n<\/li>\n<li>\n    New solution actions:<\/p>\n<ul>\n<li>\n        Create\/remove solution configurations\n      <\/li>\n<\/ul>\n<\/li>\n<li>\n    Folders and startup projects:<\/p>\n<ul>\n<li>\n        Query for information\n      <\/li>\n<li>\n        Create\/remove\n      <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>For example, here\u2019s how you could use the API to build a specific project:<\/p>\n<pre class=\"prettyprint language-cs language-csharp\" style=\"padding-bottom: 0px; margin-bottom: 0px;\"><span style=\"font-size: 8.5pt;\"><code class=\"language-cs language-csharp\">var result = await this.Extensibility.Workspaces().QueryProjectsAsync(\r\n      project =&gt; project.Where(p =&gt; p.Name == projectName),\r\n  \u00a0\u00a0\u00a0\u00a0cancellationToken);\r\nawait result.First().BuildAsync(cancellationToken);\r\n<\/code><\/span><\/pre>\n<p><span style=\"font-size: 10pt;\">Sample code for building a specific project<\/span><\/p>\n<p>  And here\u2019s how you can create a new solution configuration programmatically:<\/p>\n<pre class=\"prettyprint language-cs language-csharp\" style=\"padding-bottom: 0px; margin-bottom: 0px;\"><span style=\"font-size: 8.5pt;\"><code class=\"language-cs language-csharp\">await this.Extensibility.Workspaces().UpdateSolutionAsync(\r\n      solution =&gt; solution.Where(solution =&gt; solution.BaseName == solutionName),\r\n  \u00a0\u00a0\u00a0\u00a0solution =&gt; solution.AddSolutionConfiguration(\"Foo\", \"Debug\", false),\r\n  \u00a0\u00a0\u00a0\u00a0cancellationToken);\r\n<\/code><\/span><\/pre>\n<p><span style=\"font-size: 10pt;\">Sample code for creating a new solution configuration<\/span><\/p>\n<p>  Please give these new features a try and let us know which other project system capabilities you need for your extensions!<\/p>\n<p>&nbsp;<\/p>\n<h3>We can\u2019t do this without you!<\/h3>\n<p>We need your help as we continue to develop VisualStudio.Extensibility! Please try out this preview release and let us know what you think. Check out the <a href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\">docs<\/a>, browse the <a href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\/Samples\">code samples<\/a>, and build your <a href=\"https:\/\/aka.ms\/VisualStudio.Extensibility\/FirstExtension\">first extension<\/a>. You can send feedback, report issues, or request features through our <a href=\"https:\/\/github.com\/microsoft\/VSExtensibility\/issues\">issue tracker<\/a>.<\/p>\n<p>We\u2019re prioritizing the features that our extenders ask for, so please give VisualStudio.Extensibility a try and share your thoughts with us!<\/p>\n<p>&nbsp;<\/p>\n<h3>Take Our Survey<\/h3>\n<p>Please help us design the best extensibility experience for Visual Studio by taking our survey here! We\u2019re using the data to help identify what\u2019s working and what we can improve. Whether you\u2019re an extension author or an extension user, please let us know what you think!<\/p>\n<p>Take the survey <a href=\"https:\/\/www.research.net\/r\/YQDNZYR\">here<\/a>! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The new VisualStudio.Extensibility SDK helps you build extensions that run outside of the main IDE process for improved performance and reliability. With a focus on developer productivity, it features a modern, intuitive .NET Core-based API and solid, well-maintained documentation. This public preview release builds on our previous developer previews, and it brings with it the [&hellip;]<\/p>\n","protected":false},"author":108688,"featured_media":247284,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1388,155],"tags":[294,12,6815],"class_list":["post-247272","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-extensibility","category-visual-studio","tag-extensions","tag-visual-studio","tag-visual-studio-2022"],"acf":[],"blog_post_summary":"<p>The new VisualStudio.Extensibility SDK helps you build extensions that run outside of the main IDE process for improved performance and reliability. With a focus on developer productivity, it features a modern, intuitive .NET Core-based API and solid, well-maintained documentation. This public preview release builds on our previous developer previews, and it brings with it the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/247272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/108688"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=247272"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/247272\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/247284"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=247272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=247272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=247272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}