We are migrating some .NET applications from full framework to .NET core and we are trying to find out the best way to do so.
One of the major changes is the one related to the way applications are configured. In the .NET full framework we used to put application settings inside the app.config file and to read them by means of the ConfigurationManager class.
I know that .NET core supports a new configuration system based on the nuget package Microsoft.Extensions.Configuration and the various packges for the configuration sources. However, at the same time, Microsoft has extended the support for the ConfigurationManager class to .NET core, by means of the nuget package System.Configuration.ConfigurationManager.
Here are my questions:
- what is the intended best practice to configure .NET core applications ?
- the support for app.config file has been implemented only for backward compatibility, so that the porting to .NET core of legacy applications is easier, or it is considered a best practice and it will be maintained in the future ?