I am using this in ASp.net MVC Test project:
ConfigurationSettings.AppSettings["myconn"] and I get green line under this method saying this method is obsolete and I should use ConfigurationManager.appsettings but configurationManager is not available in intellisence I have included
using system.Configuration at the top of Unit Test class.
You need to add a reference to
System.Configurationin your project first. Then it will be available in Intellisense.Edit:
There are some basic and legacy methods/classes in the
System.Configurationnamespace included inSystem.dllthat is referenced in every project (someone correct me if I’m naming the wrong .dll, but I’m pretty sure that’s where they are). When they got rid of theConfigurationSettingsclass for theConfigurationManagerclasses, they abstracted the namespace out into its own .dll, but they didn’t yank the namespace entirely.