How can I provide settings that can be accessed through ConfigurationManager
in asp.net 5?
I am using older packages that do not support the new Microsoft.Framework.ConfigurationModel
and are looking to the ConfigurationManager to get connection strings, app settings, and even configuration sections. Adding an app.config to the project does not appear to have any effect.
For example, app.config:
<configuration>
<connectionStrings>
<add name="logging" connectionString="Server=.\SQLExpress;Database=logging;Trusted_Connection=True;"/>
</connectionStrings>
</configuration>
ConfigurationManager.ConnectionStrings["logging"]
returns null. Instead, the ConfigurationManager.ConnectionStrings
only contains the machine.config defaults.