How to force reload cached JSON Schemas in Visual Studio
I recently made some changes to the appsettings.json
schema available on schemastore.org. I struggled a bit getting Visual Studio to pick up the recent changes, so here's a very short blog post for anyone with the same problem.
For anyone not familiar with Schema Store, it's a set of JSON schemas for almost everything a developer can think of. When Visual Studio shows IntelliSense when editing JSON files, it does because it was able to find a schema for the JSON files on schemastore.org.
To avoid fetching the schema every time a file is opened, Visual Studio caches schema files locally. I tried finding the cache, but only the XML Schema cache location seems to be documented (interested in hearing from you if you know the location of the cache). What I found was a small "hack" to tell Visual Studio to reload the cache.
Go to Tools | Options and search for Schema (it's beneath Text Editor | JSON | Schema). Make a copy of the schemastore.org URL and remove the existing entry in the list. Then add the same URL as a new entry:
That's it. Close any open *.json
files and re-open them to get the updated schema.
elmah.io: Error logging and Uptime Monitoring for your web apps
This blog post is brought to you by elmah.io. elmah.io is error logging, uptime monitoring, deployment tracking, and service heartbeats for your .NET and JavaScript applications. Stop relying on your users to notify you when something is wrong or dig through hundreds of megabytes of log files spread across servers. With elmah.io, we store all of your log messages, notify you through popular channels like email, Slack, and Microsoft Teams, and help you fix errors fast.
See how we can help you monitor your website for crashes Monitor your website