app.config is used to store configuration details for a .NET Framework application, and it's a traditional way to store configuration data in XML format. However, in recent times, there's a trend towards using appsettings.json files instead of app.config for storing configuration data in .NET applications.
The main difference between app.config and appsettings.json is the format of the data they store. app.config uses XML format, while appsettings.json uses JSON format.
Another difference is that app.config is specific to .NET Framework, while appsettings.json is used in .NET Core applications. You also get web.config, which is used specifically for a .NET Framework Web based application.
In your case I would go with what the framework provided and use the app.config file.
app.config
was part of a layering concept, where there was also auser
and and amachine
config. But since deployments are getting more and more atomic (containerization), there is no need for such things in many cases and a much more lightweight format likeappsettings.json
can be used. – Detta