Error occurred while access Microsoft.Extensions.HostingServices. Could not parse JSON file Error occurred while access Microsoft.Extensions.HostingServices. Could not parse JSON file json json

Error occurred while access Microsoft.Extensions.HostingServices. Could not parse JSON file


It turns out that my appsettings.json was missing a closing curly brace. Adding that in fixed the problem.


Luckily I came across this thread and I'm kicking myself for not taking the error message literally.
There were plenty of hints...enter image description here


The one reason the error doesn't just **POP** out is because its just a **warning**.

You can change this behavior in Visual Studio
Goto Tools->Options.
Click Text Editor->JSON->Advanced.
Under Validation change Show errors as warnings to False

enter image description here
You still get the same message on the console..But this change makes the error a little more dramatic that there is an issue.enter image description here


The issue for me is that I had a typo in my user secrets secrets.json file. I was missing a comma after a property value.

For reference, you can edit user secrets in VS2019 by right-clicking on a .NET Core project and selecting Manage User Secrets.