System.Configuration.ConfigurationManager.AppSetting is obsolete
Posted on 2006-05-18
I used VS2005. When i access a value in the config file, i write the code like this:
string strFilename = System.Configuration.ConfigurationSettings.AppSettings["FileName"].ToString();
But when i built the project, the warning appear like this:
"This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings"
I found this problem in MSDN and i used System.Configuration.ConfigurationManager. But the new error happen: ConfigurationManager is not in System.Configuration. What can i do? How can i fix this problem. Thanks!