Where is ConfigurationManager's namespace?

user1017882 picture user1017882 · Oct 4, 2012 · Viewed 81.5k times · Source

I've got a reference to System.Configuration - and ConfigurationSettings is found no problem - but the type or namespace 'ConfigurationManager' could not be found!?

I've read around - and it looks like it should belong to the same namespace as the ConfigurationSettings class.

EDIT: Please take note - I've clearly said I have added a reference to System.Configuration. There's been 4 comments already about this.

Answer

Ashwin Chandran picture Ashwin Chandran · Oct 4, 2012

ConfigurationManager is a part of the System.Configuration after .Net 2.0. Add a reference to the System.Configuration dll. Try using System.Configuration.ConfigurationManager.