Answers for "configurationmanager does not exist in the current context"

0

configurationmanager does not exist in the current context

It's not only necessary to use the namespace System.Configuration. You have also to add the reference to the assembly System.Configuration.dll , by

Right-click on the References / Dependencies
Choose Add Reference
Find and add System.Configuration. In Assembly
This will work for sure. Also for the NameValueCollection you have to write:

using System.Configuration;

var efConnectionString = ConfigurationManager.ConnectionStrings["MyWebConfigEfConnection"].ConnectionString;
Posted by: Guest on August-10-2020
0

configurationmanager does not exist in the current context

I'm using JetBrains Rider and C#. Couldn't get rid of this problem (which manifested by Rider being unable to solve symbol "ConfigurationManager") until I installed NuGet Package for System.Configuration.ConfigurationManager into my project.
Posted by: Guest on January-05-2021

Code answers related to "configurationmanager does not exist in the current context"

Browse Popular Code Answers by Language