System.configuration.configurationmanager Version 4.0.1.0 !exclusive! -

var emailSection = ConfigurationManager.GetSection("emailSettings") as NameValueCollection; string smtp = emailSection["SmtpServer"];

The ConfigurationManager may hold a file handle on App.config . In long-running services, this can cause locking issues. system.configuration.configurationmanager version 4.0.1.0

Copy your .NET Framework’s App.config into the new project root. Rename it to App.config (not appsettings.json ). var emailSection = ConfigurationManager

To understand why Version=4.0.1.0 is a talking point, we must first understand the history of .NET configuration. string smtp = emailSection["SmtpServer"]