Home All Groups Group Topic Archive Search About

ConfigurationManager unrecognized

Author
19 Nov 2006 5:14 AM
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

Author
19 Nov 2006 6:24 AM
Tom Shelton
Dean Slindee wrote:
Show quoteHide quote
> 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.

--
Tom Shelton