Writing extensions just got easier

Mads

In collaboration with the open source community, we’re introducing a new toolkit for writing Visual Studio extensions. Extensions used to be difficult to write, but the new toolkit makes it easier than ever. The toolkit consists of brand-new tooling inside Visual Studio as well as new APIs to code against. It’s all included in the free Extensibility Essentials extension.

The community of Visual extenders are in a unique position to help create the tooling inside Visual Studio that they themselves would like to use. This toolkit is made by the community – for the community.

Getting started

The best way to getting started with the toolkit is to visit the VSIX Cookbook. It’s a website with guides, documentation, and recipes designed to help jump start extension development. It’s for beginners and advanced extenders alike. For short video walkthroughs on a bunch of extensibility topics using the toolkit, head on over to the VS Fundamentals: Extensions playlist.

It would be cool if…

Ok, so we made it easier to get started, but where do you get ideas for what extensions to write? When I’m out of ideas, I often browse through the open feature requests logged by Visual Studio users. That’s my favorite go-to place for inspiration and I always find ideas I can use. My test is that if the idea can successfully finish the sentence: It would be cool if…, then it’s a good one.

Happy coding!

13 comments

Leave a comment

  • Piotr Karczmarz

    Thank you Mads for creating all those handy VSIX dev related plugins, VsixCommunity project and ton of educational content for VSIX developers. 🥳

    When I had first entered VSIX development about 2015 I used MSDN, Stackoverflow and MS Forums. It was hard to get going. It was like dark ages compared to renaissance that we have today thanks to your hard work and dedication 🙏. I hope Visual Studio management team is aware of how much you have done to popularize Visual Studio plugins development.

  • Ben Medina

    The new Cookbook documentation is a great start. But when a topic is not covered, it’s difficult to know where to go to look for help.

    For example, I’m porting a fairly simple extension to VS2022, so I decided to try the new Community.VisualStudio.Toolkit APIs. I need to do something fairly simple: fetch the current solution configuration and platform. My previous code looked like this:

    var activeConfig = dte_.Solution.Properties.Item(“ActiveConfig”).Value.ToString(); // Will be, e.g., “Debug|x64”

    It’s unclear how to do this with the new APIs. VS.Solutions.GetCurrentSolutionAsync gets a SolutionItem object, but there are no properties to query.

    Can you recommend a place where folks can get their questions about the new APIs answered?

    • Mads KristensenMicrosoft employee

      I don’t plan on it since there is no way for me to easily port the missing colors to the new features in VS 2019 (it was originally the 2017 theme). If anyone wants to attempt the effort and send a PR, I’d be happy to merge it.

  • Enrique Thedy

    Hello Mads, thanks for all the extensions and tools, and also for your passion for teach to the rest of us the process of make a good VSIX project.

    Now, I accept I’m hungry for more…then I wish to suggest you an episode about how to write an extension for text code highlighting.

    Thanks again for your great job and a “gran saludo” from Rosario, Argentina!

    • Jefry Pozo

      Saludos desde República Dominicana, Enrique!

      I believe the new APIs are a work in progress, so for certain things you’d still need to learn to use the old APIs.
      A long time ago I tried to make one and found some alternatives I could readily use instead of making my own. But if you’re still interested you can look at the code of these three extensions:

      Semantic Syntax Colorizer: https://github.com/hicknhack-software/semantic-colorizer
      CoCo: https://github.com/GeorgeAlexandria/CoCo
      Color Coder: https://github.com/HamidMosalla/VisualStudio-ColorCoder

      Let me know if you need additional help.

      • Enrique Thedy

        Hola Jefry! And thanks for your response!

        Yes, I’ll start by looking at the links you share with us.

        Right now, using VS2022 CE, the only “gap” in syntax highlight (in my own experience) was the VUE html template between script tags (I use it in the razor view, not in separate .vue files). In VS19 CE the same template is highlighted OK… That is the only reason right now for think about write such extension, but it’s not an easy work and, sincerelly, I can live without it…

        Thanks again to you and Mr Kristensen

    • Stuart Ballard

      I’m so glad someone else asked about this! I’ve a home-grown ORM tool that uses files with a basic syntax I originally came up with so long ago that JSON didn’t exist yet, and I’ve always wanted to figure out how to add syntax highlighting and intellisense for it. It’ll be a vanity project at this point, because the last real customer of that codebase is in the process of migrating off it, but I’d still love to see if I can actually do it.

  • Bin Dong

    I just watched your tutorial on vs youtube channel. It’s so amazing! Thank you so much for improving the dev experience.

  • Marcel

    Hi Mads, first of all I want to say thank you for the great job and support to VSIX development community!
    I have some libraries for code generation using Roslyn APIs in .Net 5.0.
    Now I’m trying to include them into an extension using VS2022 but it still using VSIX Project template with .Net Framework 4.8.
    Is it in the Microsoft roadmap to update the VSIX templates to 5.0 soon?
    Currently the only option that I see is to downgrade my libraries to 4.8 but it is not sweet at all.
    I will appreciate any suggestion in this way.
    Thanks a lot!