Visual Studio warning configuration element is not declared

Visual Studio warning configuration element is not declared

Visual Studio warning configuration element is not declared
Visual Studio warning

Error


  • When you open your Visual Basic Project, and navigate to App.config file for editing, you notice that <configuration> is underlined with blue line. When the cursor hovers, you see this message ( The 'configuration' element is not declared ).

configuration element is not declared

Solution


  • Open your VB.Net Project.
  • From XML menu, choose Schemas..
vb.net app.config
App.Config - configuration element solution

  • From XML Schemas, look for DotNetConfig.xsd
  • From Dropdown Use, choose Use this schema
  • Click OK.
vb.net - app.Config - configuration solution

Create your own App.config file, Set Value, Get Value

  • You need to add reference to Configuration.dll in your project.
  • Create Class MyConfigs.vb

Popular posts from this blog

Visual Basic Online Courses DataGridView Add Edit Delete

Visual Basic 2010 Working With DataBase Full Project Example

VB .NET WebView2 WinForms tips

VB NET Check internet connection

Visual Basic .Net - Button Sound / Music Play

Visual Basic 2010 Math Functions