G
Guest
Hey developers
I 'm trying to migrate the following code to vs2005 but i'm getting an error
this is the code
in vs2003
in the app.config file
<add key = "ConnectionString"
value= "a valid connectionstring"
/>
in the code view
string my_connection =
System.Configuration.ConfigurationSettings.AppSettigs.Get("ConnectionString");
this code compiles fine in VS2003 but in VS2005 with the same app.config
file i'm getting the following errors
System.Configuration.ConfigurationSettings.AppSettings is obsolete it has
been replaced by System.Configuration.ConfigurationManager.AppSettings
an the connectionString name is said not to exist in the current context
also when i'm trying to use the System.Configuration.ConfigurationManager
which is a valid class the intellisense just doesn't show this to me
so i really need some help on this code
thanks in advance
I 'm trying to migrate the following code to vs2005 but i'm getting an error
this is the code
in vs2003
in the app.config file
<add key = "ConnectionString"
value= "a valid connectionstring"
/>
in the code view
string my_connection =
System.Configuration.ConfigurationSettings.AppSettigs.Get("ConnectionString");
this code compiles fine in VS2003 but in VS2005 with the same app.config
file i'm getting the following errors
System.Configuration.ConfigurationSettings.AppSettings is obsolete it has
been replaced by System.Configuration.ConfigurationManager.AppSettings
an the connectionString name is said not to exist in the current context
also when i'm trying to use the System.Configuration.ConfigurationManager
which is a valid class the intellisense just doesn't show this to me
so i really need some help on this code
thanks in advance