ConfigurationManager unrecognized

D

Dean Slindee

With the following three statements in an ApplicationEvents.vb file, I get a
message saying "Name 'ConfigurationManager' is not declared." on the third
statement.
Imports System.Configuration

Imports System.Collections.Specialized

Dim connections As Collections.Specialized.StringCollection =
ConfigurationManager.ConnectionStrings



Using VS2005. Puzzled, because when I declare "Imports
System.Configuration", the next intellisense choice is
".ConfigurationSettings" which seems to be deprecated according to MSDN help
in favor or ConfigurationManager, which errs.



Thanks in advance.

Dean S
 
T

Tom Shelton

Dean said:
With the following three statements in an ApplicationEvents.vb file, I get a
message saying "Name 'ConfigurationManager' is not declared." on the third
statement.
Imports System.Configuration

Imports System.Collections.Specialized

Dim connections As Collections.Specialized.StringCollection =
ConfigurationManager.ConnectionStrings



Using VS2005. Puzzled, because when I declare "Imports
System.Configuration", the next intellisense choice is
".ConfigurationSettings" which seems to be deprecated according to MSDN help
in favor or ConfigurationManager, which errs.



Thanks in advance.

Dean S

You need to add a reference to System.Configuration.dll.
 
Top