473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Obsolete function

Hi

When using 'ConfigurationSettings.AppSettings.Get' I get the below warning.
What is the problem and how can I fix it?

Thanks

Regards

= Warning Message ============================

Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection ' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
May 12 '07 #1
5 2167
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi

When using 'ConfigurationSettings.AppSettings.Get' I get the below warning.
What is the problem and how can I fix it?

Thanks

Regards

= Warning Message ============================

Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection ' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.

Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.

--
Tom Shelton

May 12 '07 #2
Hi

There is no dll under System.Configuration. Also System.Configuration is
already imported. Using ConfigurationManager.AppSettings.Get(key) instead of
ConfigurationSettings.AppSettings.Get(key) gives the error
'ConfigurationManager' is not declared.

Thanks

Regards

"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
>Hi

When using 'ConfigurationSettings.AppSettings.Get' I get the below
warning.
What is the problem and how can I fix it?

Thanks

Regards

= Warning Message ============================

Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollectio n' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configu rationManager.AppSettings'

They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.

Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.

--
Tom Shelton

May 12 '07 #3
John,

Try changing it to this:

System.Configuration.ConfigurationManager.AppSetti ngs

Ed

"John" wrote:
Hi

There is no dll under System.Configuration. Also System.Configuration is
already imported. Using ConfigurationManager.AppSettings.Get(key) instead of
ConfigurationSettings.AppSettings.Get(key) gives the error
'ConfigurationManager' is not declared.

Thanks

Regards

"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi

When using 'ConfigurationSettings.AppSettings.Get' I get the below
warning.
What is the problem and how can I fix it?

Thanks

Regards

= Warning Message ============================

Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection ' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.

Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.

--
Tom Shelton


May 12 '07 #4
Using System.Configuration.ConfigurationManager.AppSetti ngs.Get(key) gives
the error 'ConfigurationManager' is not a member of 'Configuration'.

Many Thanks

Regards
"EdB" <Ed*@discussions.microsoft.comwrote in message
news:0C**********************************@microsof t.com...
John,

Try changing it to this:

System.Configuration.ConfigurationManager.AppSetti ngs

Ed

"John" wrote:
>Hi

There is no dll under System.Configuration. Also System.Configuration is
already imported. Using ConfigurationManager.AppSettings.Get(key) instead
of
ConfigurationSettings.AppSettings.Get(key) gives the error
'ConfigurationManager' is not declared.

Thanks

Regards

"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@n59g2000hsh.googleg roups.com...
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi

When using 'ConfigurationSettings.AppSettings.Get' I get the below
warning.
What is the problem and how can I fix it?

Thanks

Regards

= Warning Message ============================

Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollectio n' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configu rationManager.AppSettings'

They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.

Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.

--
Tom Shelton



May 12 '07 #5
On May 11, 9:40 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi

There is no dll under System.Configuration. Also System.Configuration is
already imported. Using ConfigurationManager.AppSettings.Get(key) instead of
ConfigurationSettings.AppSettings.Get(key) gives the error
'ConfigurationManager' is not declared.

Thanks

Regards

"Tom Shelton" <tom_shel...@comcast.netwrote in message

news:11**********************@n59g2000hsh.googlegr oups.com...
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi
When using 'ConfigurationSettings.AppSettings.Get' I get the below
warning.
What is the problem and how can I fix it?
Thanks
Regards
= Warning Message ============================
Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection ' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.
Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.
--
Tom Shelton- Hide quoted text -

- Show quoted text -
System.Configuration.dll - go and add it to your project references.
System.Configuration.ConfigurationManager lives in that dll. VB2005 -
may very well add it automatically, because of the new my
functionality. I can assure you that in .net 2.0 there most certainly
is a system.configuration.dll - i work in C#, and it does not import
it by default.

--
Tom Shelton

May 12 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: bruce stockwell | last post by:
Using 'self' in classes seems pretty straight forward. My curiosity is why I have to use it. Shouldn't it be implied? If I create an instance of 'human' called 'bruce' and call the method 'blink'...
10
by: Michael Riggio | last post by:
Does anyone know why this property is obsolete? Also, is there an alternative available?
0
by: jbeerni | last post by:
In .NET, you can mark methods and accessors as obsolete by using the directive. I've found some interesting behavior with the directive when used in a class which is referenced as a return type...
4
by: BrianProgrammer | last post by:
I have this code below, that works like a champ, but two lines are continually marked as obsolete. See embeded notes. Private Shared Function TransformHTMLString(ByVal XSLT As String, _ ByVal...
2
by: Steve James | last post by:
I am trying to mark an override method in a derived class as obsolete using the ObsoleteAttribute. The compiler, however is not picking up this attribute and is not generating a warning or an...
1
by: BrianProgrammer | last post by:
I have this code below, that works like a champ, but two lines are continually marked as obsolete. See embeded notes. Private Shared Function TransformHTMLString(ByVal XSLT As String, _ ByVal...
4
by: Phill W. | last post by:
If I have a reusbale (GAC-'registered') assembly that contains two, related classes (imagine a DataSet and DataTable; the former contains instances of the latter, the latter has a reference to its...
2
by: SenthilVel | last post by:
Hi All I am Trying to build my 1.1 framework code with 2.0 framework using Visual Studio 2005 installed in my machine. when i tried doing doing so , i get errors like : " Error 1 Warning as...
5
by: John | last post by:
Hi I am getting obsolete function warnings on these two liens but can't figure the correct syntax for the new equivalent functions; ConfigurationSettings.AppSettings.Get(key)...
2
by: John | last post by:
Hi I am getting a 'function is obsolete' warning on the following two statements; ConfigurationSettings.AppSettings.Get(Key) and Dns.GetHostByName(strServer)
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.