New ConfigurationManager in VS 2005

Using .NET Framework 1.1 i have used following code to pull a encrypted connection string from the app.conf file, I used….

And the compiler gave me the following error.
Warning 1 ‘System.Configuration.ConfigurationSettings.AppSettings’ is obsolete: ‘This method is obsolete, it has been replaced by ConfigurationManager.AppSettings’

So I try and change my Code to the following …

and I get a compiler error, saying the compiler can’t find ConfigurationManager.

Well here’s the confusion…. The Original System.Configuration.ConfigurationSettings class is found in the System.dll assembly. There is a new assembly with all the new ConfigurationManager classes as System.Configuration.dll. Before using the ConfigurationManager class, you must first set a reference to the new System.Configuration.dll.

Add a reference to System.Configuration by clicking Project -> Add Reference… and searching through the .NET components for System.Configuration


One Comment to “New ConfigurationManager in VS 2005”

  1. u need to add a dll system.configuration so as to get configurationmaneger.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: