Saturday 20 January 2007

ConfigurationManager not found error in ASP.NET 2.0

You have upgraded your application to ASP.NET 2.0 and you are now getting the warning "This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings" on all your
ConfigurationSettings.AppSettings references ? And this not enough , when you replace the ConfigurationSettings with ConfigurationManager, the compiler tells you that "ConfigurationManager" does not exist, even though you have "using System.Configuration" in your header ? No worries !

Add a reference in your project to "System.Configuration.dll" trough References / Add Reference / .NET -> scroll down until you find it inthe list.

It took me couple of hours, and I believe it is worth mentioning for all of you who still search.


No comments: