March 14th, 2019

Code more, scroll less with Visual Studio IntelliCode

Mark Wilson-Thomas
Principal Program Manager

You may know that Visual Studio IntelliCode helps you write code from commonly used libraries, based on machine learning across thousands of open sourced GitHub repos. Instead of having to search and scroll through a sorted list of methods and properties, you get suggestions on the most likely ones for your coding context as you type.

While the wisdom of the open source community is delivered direct to your editor’s IntelliSense, what if you want to write code based on a set of APIs not included in the GitHub public repos? Perhaps you use numerous internal utility and base class libraries, or domain-specific libraries that aren’t often used in open-source.  You may not know that if you code in C# you can have IntelliCode analyze to your own code and share what it learns it across your team, so you can all benefit from recommendations and more easily collaborate. Depending on your codebase, analyzing your code and sharing the resulting model could be done in a matter of minutes and save your team hours of hunting through lists and documentation diving.

How do I create and use my own model?

It’s as easy as 3 short steps.

  1. Make sure you have the IntelliCode extension for Visual Studio installed
  2. Effortlessly create a custom model for a codebase that contains good examples of usage of your desired class libraries – remember that the quality of suggestions offered by IntelliCode is directly related to the quality of the samples you provide.
  3. Easily share it with your colleagues so they can start using the recommendations. If you need to update the model, for instance if there are substantial changes to the code, your team will automatically receive the latest updates when you retrain.

Creating an IntelliCode Custom Model

My colleague Allison Buchholtz-Au has a great video covering this topic if you’d like to see more details.

If you’re a contributing author of an open source component, it’s simple for you to share a model that helps your users leverage your libraries more easily. Don’t forget to share the model somewhere that users who are getting started will find it. We suggest linking to it from the README in your repo.

What about security?

Most importantly, we don’t upload your raw source code to our servers. You can learn more about what happens when you train a model in our FAQ.

Your feedback matters

If you have more suggestions and feedback about IntelliCode, we’d love to hear from you. Get in touch and let us know more.

Author

Mark Wilson-Thomas
Principal Program Manager

Mark is a Program Manager on the Visual Studio IDE team, where he's been building developer tools for over 15 years. Most recently he's been working on AI assisted developer tools like GitHub Copilot Chat for Visual Studio. Prior to that, he worked on the Visual Studio Editor, and on tools for Office, SQL, WPF and Silverlight.

8 comments

Discussion is closed. Login to edit/delete existing comments.

  • Tsahi Asher

    Still doesn’t beat ReSharper IntelliSense.

    • Mark Wilson-ThomasMicrosoft employee Author

      Hi Tsahi

      Thanks for the feedback. I’d love to hear what your most needed capabilities in IntelliSense are, which you feel we are missing. Drop me a line at mwthomas at microsoft dot com.

      Thanks

      Mark

  • Jeremy Thompson

    Hi Mark, this looks great – most switched-on Devs realised MS would use AI on GitHub. Unfortunately it wont work for me as the only Supported Product is Microsoft.VisualStudio.Community. I’m on Enterprise VS2017, any ETA for when paying customers get the goodness?

    • Mark Wilson-ThomasMicrosoft employee Author

      Hi @Jeremy
      Thanks for your feedback. There are no edition restrictions on installation of the Visual Studio IntelliCode extension, so you should be able to install it as long as you have Visual Studio 2017 Version 15.9 or higher. It's possible that you don't have a late enough version of Visual Studio 2017 - please can you check that? If you are running Version 15.9 or higher, and still can't install, please can you raise...

      Read more
      • Mark Wilson-ThomasMicrosoft employee Author

        …by the way, I want to ensure it’s clear that we only train our base models against public GitHub repos. You can opt to train on your own private code per the instructions above, for your own use, but we don’t put that information into the base models.

        Mark

    • Tsahi Asher

      I installed it on Enterprise 2017 with no issues.

  • Flux

    Hello, Mark. Thanks for this educational post. This IntelliCode feature is definitely something I am going to try.
    I have a request about the blog though. Would you please consider using a video format instead of an animated GIF file in the future? A video format lets the reader pause, fast-forward and rewind the video to better see critical details. (And this video definitely needs that. I ended up downloading it and converting it to...

    Read more
    • Mark Wilson-ThomasMicrosoft employee Author

      Hello Fleet Command.
      Thanks for pointing out this problem; I'll make sure I include a proper pausable, rewindable video in future posts. As it happens there is a already a slightly longer video that covers this material, by my colleague Allison, here:
      https://channel9.msdn.com/Events/Connect/Microsoft-Connect--2018/D160
      I hope it is useful to you.
      If you do get a chance to try IntelliCode, I would love to hear from you about your experience. Please feel free to drop me...

      Read more