March 2nd, 2021

IntelliSense for appsettings.json

James Newton-King
Principal Software Engineer

The appsettings.json file is a common way to configure .NET apps. ASP.NET Core uses appsettings.json and appsettings.${Environment}.json files to configure some of its most frequently used features, including:

  • Database connection strings
  • Kestrel endpoints
  • HTTPS certificates
  • Logging
  • Host filtering

Visual Studio and Visual Studio Code (with C# extension 1.23.8 or later) now support IntelliSense of well known appsettings.json configuration settings. IntelliSense allows you to quickly edit your app’s configuration and get immediate feedback on available properties or typos.

IntelliSense for appsettings.json in action:

Image appsettings schema

There isn’t anything you need to do to enable this feature. Try it out today! Happy coding.

Author

James Newton-King
Principal Software Engineer

I build APIs and servers for ASP.NET Core.

7 comments

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

  • Андрій Чебукін

    What about Azure Functions? LocalSettings.json

  • Adrien Clerbois

    Hi James,

    Awesome feature!

    Is there a way to expand the supported features ?

    Br,

    Adrien C.

  • Daniel Sturm

    That's a great start.

    Given that many applications store many of their own settings in the app settings file it'd be great if the schema could be open source so that it could be used as the basis for our custom files.

    I've written (or generated) my own schema files in the past that only included the most important settings that I was aware of and having a complete up to date file would be tremendously useful.

    Read more
  • Nikola Petrovic

    This is a great addition! Are json schemas behind this feature perhaps?