I simply can not get Visual Studio 2005 to find the System.Configuration.ConfigurationManager class. Here is the code:
x = ConfigurationSettings.AppSettings["MySetting"]
// The name 'ConfigurationManager' does not exist in the current context
x = System.Configuration.ConfigurationManager.AppSettings["MySetting"]
// The type or namespace name 'ConfigurationManager' does not exist in the
// namespace 'System.Configuration' (are you missing an assembly reference?)
I absolutely, positively do have a reference to System.Configuration in the project and it is definitely in the right project. The DLL is version 18.104.22.168 and the runtime version is 2.0.50727 - exactly the same as all the others. I have tried removing the reference and re-adding it. One strange thing is that when it is displayed in the References 'folder' of the project, it is displayed as 'System.configuration' - with a lower case 'c'.
Visual Studio can find the System.Configuration.ConfigurationSettings class with no problem other than the warning that it is obsolete. The project is a web project and the code is in the code-behind of a WebControl.
Any ideas what is going on here?