Configuration File code error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • genojoe

    #1

    Configuration File code error

    http://msdn2.microsoft.com/en-us/lib....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.Configur ation.Configura tion = _
    ConfigurationMa nager.OpenExeCo nfiguration( _
    ConfigurationUs erLevel.None)

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

    System.Configur ation.Configura tion is not defined. Surely I am missing
    something simple.


  • dotNetDave

    #2
    RE: Configuration File code error

    I'm assuming you have created an app.config file?

    =============== =============== ========
    David McCarter

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


    "genojoe" wrote:
    http://msdn2.microsoft.com/en-us/lib....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.Configur ation.Configura tion = _
    ConfigurationMa nager.OpenExeCo nfiguration( _
    ConfigurationUs erLevel.None)
    >
    When I place this in my VB.Form code, I get the following error:
    >
    System.Configur ation.Configura tion is not defined. Surely I am missing
    something simple.
    >
    >

    Comment

    • mlafarlett@yahoo.com

      #3
      Re: Configuration File code error


      genojoe wrote:
      http://msdn2.microsoft.com/en-us/lib....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.Configur ation.Configura tion = _
      ConfigurationMa nager.OpenExeCo nfiguration( _
      ConfigurationUs erLevel.None)
      >
      When I place this in my VB.Form code, I get the following error:
      >
      System.Configur ation.Configura tion is not defined. Surely I am missing
      something simple.
      IT may be something simple but I've not figured it out either...any
      luck?

      Comment

      Working...