IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Fix Obsolete ConfigurationSettings.GetConfig API

When you’re upgrading code from .NET Framework 1.1 to 2.0, you will get a few warnings if you use an obsolete API such as ConfigurationSettings.GetConfig, you may see something similar to this:

This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection

To which you have to replace it with ConfigurationManager.GetSection(). Or the same way with ConfigurationSettings.AppSettings.Get() to ConfigurationManager.AppSettings.Get(). The problem is after you made the change, you will encounter another error during compilation such as this:

'ConfigurationManager' is not a member of 'Configuration'.

The solution, while it’s not intuitive is actually very simple. You need to add a reference to System.Configuration.dll to the assembly.

  1. If you’re using a default view, on the right pane of your Visual Studio under your project you can right click on the References and select Add Reference….

    Add reference in Visual Studio's solution explorer

  2. Under Assemblies, look for System.Configuration and make sure it’s checked, then click OK.

    Add System.Configuration.dll reference in Visual Studio

That’s all there is to it.

Further Reading

ConfigurationSettings.GetConfig Method

April 27, 2015 Filed Under: .NET Tagged With: ASP.NET, Microsoft, Visual Studio

Buy me a coffee?

Buy me a coffee If you find any of the articles or demos helpful, please consider supporting my work here, you'll have my big thanks!

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure