System.ConfigurationSettings.AppSettings is Obsolete

This is the most irritating warning message in my C# coding experience. I have been using the AppSetting regardless of this warning message, but was recently told that even though the code compilation occurs in a similar manner, it is a burden to the C# compiler for this particular line and just for people to understand the warning again.... this is the crappy message 1 more time:
'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings'
Now why the heck does the System.Configuration.ConfigurationManager not exist!!!! This is becoz it is not referring to the correct DLL reference (The 1 in GAC is incorrect arrgh!!!!) and 1 needs to explicitly add the correct instance of the DLL (Add Reference --> System.Configuration with the correct version). Why do you need to add this explicitly and why doesn't Microsoft Visual Studio team fix this error by message by adding the DLL makes no sense.
1. Create a folder called ExplicitReference
2. Add the list of DLL's that need to be referred by the Visual Studio Project
3. Go to Registry Setting under: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders add a Key called Explicit Reference and the value of the key should be the absolute path referring to ExplicitReference.
Another method to ensure that the correct reference is always taken is to create a powershell script that will create the type of project you require as well as add the references directly to the solution so that you do not have to explicitly do this everytime. Probably will write the script and place the info in a future article. On a personal note: 182.1 lbs!! (just for me folks)

Comments

Dorababu said…
Didn't get what you said can you explain more with some images or some thing
Anonymous said…
Heya are using Wordpress for your blog platform?
I'm new to the blog world but I'm trying to get started and create my own.
Do you need any html coding expertise to make your own blog?
Any help would be really appreciated!

Also visit my website :: visit the following internet page

Popular posts from this blog

Branding your SharePoint site in a super fast way - Emgage

Load Data into Azure DW using C# in an SSIS script task

Power BI To Embed Or Not To Embed