Could not parse the JSON file
1.Create new worker service project.
2.Debug is error, but run is right.

what does your json file look like?
@scalablecory

@scalablecory All net core projects that contain the appsetting file report the same error.
@scalablecory But running without debugging does not cause errors
Looks like a BOM problem. Did this happen by default?
yes,it happen by default
Appseting.json default format is utf-8

@scalablecory Does this error have anything to do with net core built-in system.text.json component
@scalablecory That's fine if project sdk is net core 2.2. So my guess is that net core 3.0 caused the problem
Thanks for the detail. We'll need to take a look at the file to know for sure, but it's possible.
@davkean @Pilchie possible VS template or appsettings parser issue, can you help route this to the right people?
if it's templates, that would depend on the exact template. If it's System.Text.Json then corefx. @ahsonkhan for S.T.J...
I tried to repro the issue on .NET Core 3.0 and couldn't (TFM netcoreapp3.0 with <PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" />). Same with .NET Core 3.1 (even if I explicitly save the appsettings json file to UTF-8 with BOM).
@beefsteak, can you share a copy of your project that is showing the error? What version of VS are you using?
When I create a new worker service (using VS Version 16.4.0 Preview 3.0), the appsettings.json file doesn't contain a BOM so I don't see why the file you are seeing would start with a 0xEF byte.
There was a BOM issue with the JsonSerializer that was fixed for 3.1 (that is if the JSON file did contain a BOM marker), but I can't tell if that is relevant here without a repro: https://github.com/dotnet/corefx/issues/42145
Please see the attachment for the project
WorkerService1.zip
Please see the attachment for the project
This isn't a valid project/solution (and the files contain gibberish, including the cs/json files - are they encrypted or transformed in some way). Please fix this before sharing. What encoding are you saying these files as?

@ahsonkhan Sorry,I forgot that our project has been encrypted, so we can't transfer the project and I checked that the file format was utf-8
If you can't attach your full project, can you attach just the json file?
@scalablecory Hello, I think I have found the problem, it should be my machine installed the encryption firewall problem, it caused the json file to be encrypted, but I haven't found out why only debugging this problem, but thank you for your patience to solve, I think this problem can be closed.
Hello, have you encountered this problem because you put a password on your own computer ?
@scalablecory Hello, I think I have found the problem, it should be my machine installed the encryption firewall problem, it caused the json file to be encrypted, but I haven't found out why only debugging this problem, but thank you for your patience to solve, I think this problem can be closed.
Hi, I am getting the same problem in my machine. Could you please help me the steps you followed to fix this problem. Thanks in advance