-1

I've checked all obvious pitfalls and this is weird

Program.cs

 static void Main(string[] args)
        {
            var set1 = ConfigurationManager.AppSettings["Setting1"];
            //set1 is null
        }

and App.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
...
  <appSettings>
    <add key="Setting1" value="May 5, 2014"/>
  </appSettings>
...

I have other projects that work fine. Why would it stop working suddenly?

Toolkit
  • 10,779
  • 8
  • 59
  • 68
  • 1
    Clean>Rebuilt if wouldn't work, close visual studio and it's add-in/on etc. Reopen>clean>built again. Your code looks good – Mert Akkanat Nov 04 '19 at 07:16

1 Answers1

-1

Cleaning project and deleting bin and obj folders resolved it

Toolkit
  • 10,779
  • 8
  • 59
  • 68