AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

appsettings.template.json

Open jovton opened this issue 2 years ago • 1 comments

Description

[Enter feedback here] By default, when creating an appsettings.json configuration file for our .NET application, it is empty and there are no "sub" application.ENV.json files for the different deployment environments, unless we create them manually also. These we have created, and they each have different values for the settings that differ per environment. Visual Studio groups these "sub" appsettings files underneath the appsettings.json file, visually within the Solution Explorer.

Then, as an experiment, we created another file called appsettings.template.json within the root of the project in Visual Studio 17.9.2.

Suddently Visual Studio duplicated all the other previously created "sub" appsetting.ENV.json files and grouped them underneath the appsettings.template.json file within the Solution Explorer. It did this automatically without us asking, and this behavior was not expeted and undesirable.

We cannot find any documentation anywhere online about this behavior of Visual Studio when it comes to appsettings.template.json.

image

Please, can someone explain this, and document it so people can understand it and why it's happening?

Thanks much!

Johan van Tonder

Page URL

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/configuration/index.md

Document ID

ba2254a0-ea8e-9b28-e94b-edd0fc58c043

Article author

@Rick-Anderson

jovton avatar Mar 12 '24 20:03 jovton

For Visual Studio, use the Report a Problem gesture or Suggest a Feature gesture within VS, which open internal issues for the VS team.

Rick-Anderson avatar Mar 23 '24 01:03 Rick-Anderson