ConfigurationManager class not available

12,311

Solution 1

Add a reference to System.Configuration.dll.

Menu Bar -> Project -> Add Reference... -> .NET (Tab) -> System.Configuration -> OK

Solution 2

Add references to your website as System.Web.Configuration and System.Configuration and it will work.

Share:
12,311
techBeginner
Author by

techBeginner

software engineer, Bangalore/Bengaluru VB6 -> .NET (C#, ASP.NET, VB.NET) interest > new/latest technology trends

Updated on June 12, 2022

Comments

  • techBeginner
    techBeginner almost 2 years

    enter image description here

    I am not able to get the connectionString from App.Config file..

    Am I missing something?

    after creating the class, I moved the class into some folder..Is that the issue? what is the solution without moving the class?

  • Andrew Barber
    Andrew Barber over 12 years
    as a desktop application, System.Web.Configuration should not be referenced.