473,320 Members | 1,876 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,320 software developers and data experts.

Obsolete code in 2005

I was using the following function in .NET 2003:

Public Shared Function GetConnectionString() As String
Return ConfigurationSettings.AppSettings(DB_CONNECTION)
End Function

It is now underlined in green, and the message when I hover over it is that
this code is now obsolete, and has been replaced by :
System.Configuration!System.Configuration.Configur ationManager.AppSettings

I can't change my code to this - it says ConfigurationManager is not a
member of configuration...

What do I do to fix this?
Thanks in advance!

Amber

Nov 22 '05 #1
3 872
Yeah, this confused me for awhile too. The trick is you have to add a
reference to System.configuration.dll.

Greg

"amber" <am***@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
I was using the following function in .NET 2003:

Public Shared Function GetConnectionString() As String
Return ConfigurationSettings.AppSettings(DB_CONNECTION)
End Function

It is now underlined in green, and the message when I hover over it is
that
this code is now obsolete, and has been replaced by :
System.Configuration!System.Configuration.Configur ationManager.AppSettings

I can't change my code to this - it says ConfigurationManager is not a
member of configuration...

What do I do to fix this?
Thanks in advance!

Amber

Nov 22 '05 #2
Imports System.Configuration.dll

has the green underline, and says
"doesn't contain any public member or cannot be found".

Amber
Nov 22 '05 #3
"amber" <am***@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
Imports System.Configuration.dll

has the green underline, and says
"doesn't contain any public member or cannot be found".

Amber


Not Imports. "Add a reference". Different concepts.

Double click on "My Project" in Solution Explorer. Click on Reference tab.
Click Add and browse for "System.configuration.dll"

Greg
Nov 22 '05 #4

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

Similar topics

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...
18
by: Ekoj LoofLirpa | last post by:
C is such a silly, outdated language. It is a relic of a cumbersome 1970s operating system called Unix. It has no relevance in today's world. I can understand that some programmers may feel a...
8
by: shinedomain | last post by:
if I have several modules, say Inventory, Order Processing and General Ledger in my system. Each module is a window applicatiion. Each becomes a project. If DLL is obsolete, how do I call them...
1
by: guy | last post by:
What is the point of including obsolete documentation? why, in studio 2005, if i search help on Start Page do i get topics on configuring the Visual studio start page (2003) and also the same for...
1
by: Mike Hofer | last post by:
I've got two statements in my code that are both generating weird, weird, weird messages: The first one was, Dim document As System.Xml.XmlDocument Dim navigator As...
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...
6
by: mnarewec | last post by:
Hi all We are starting to migrate our apps from VB6 to .NET. I asked my local software vendor and he said MS 2005 Net Pro is Obsolete. Is this true? We just had a course in VS 2005 so we...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.