Home All Groups Group Topic Archive Search About

Configuration File code error

Author
2 Aug 2006 2:56 AM
genojoe
http://msdn2.microsoft.com/en-us/library/system.configuration.configuration

This site contains sample code that does not compile for me.  The line of
code is:

' Get the current configuration file.
        Dim config As _
        System.Configuration.Configuration = _
        ConfigurationManager.OpenExeConfiguration( _
        ConfigurationUserLevel.None)

When I place this in my VB.Form code, I get the following error:

System.Configuration.Configuration is not defined.  Surely I am missing
something simple.

Author
2 Aug 2006 7:07 PM
dotNetDave
I'm assuming you have created an app.config file?

======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485


Show quoteHide quote
"genojoe" wrote:

> http://msdn2.microsoft.com/en-us/library/system.configuration.configuration
>
> This site contains sample code that does not compile for me.  The line of
> code is:
>
> ' Get the current configuration file.
>         Dim config As _
>         System.Configuration.Configuration = _
>         ConfigurationManager.OpenExeConfiguration( _
>         ConfigurationUserLevel.None)
>
> When I place this in my VB.Form code, I get the following error:
>
> System.Configuration.Configuration is not defined.  Surely I am missing
> something simple.
>
>
Author
16 Aug 2006 9:13 PM
mlafarlett
genojoe wrote:
Show quoteHide quote
> http://msdn2.microsoft.com/en-us/library/system.configuration.configuration
>
> This site contains sample code that does not compile for me.  The line of
> code is:
>
> ' Get the current configuration file.
>         Dim config As _
>         System.Configuration.Configuration = _
>         ConfigurationManager.OpenExeConfiguration( _
>         ConfigurationUserLevel.None)
>
> When I place this in my VB.Form code, I get the following error:
>
> System.Configuration.Configuration is not defined.  Surely I am missing
> something simple.

IT may be something simple but I've not figured it out either...any
luck?