11.14.2013

Visual Studio using old app.config value or setting

Once in a blue moon, I will run into a problem with Visual Studio 2012 where the App.config for a console application is getting cached somewhere and there's no way to release it.  So the App.config is stuck with old values which aren't correct for the application today.  It's happened maybe twice this year to me.

The App.config in my solution shows the correct values.  The one that's been put in the output directories for Debug and Release both look good, but my quick little console application is pulling ghost values from an App.config from last week. I've tried building, rebuilding, and finally, all to no avail.

The only thing I could think of to fix this ( which did work ) was:

  • Copying the contents of the App.config file from within Visual Studio
  • then delete the file from within Visual Studio
  • Then re-add the config file
  • Then paste in the contents.
  • Rebuild and run.
I'm going to chalk this one up to ghosts in the machine.  

No comments:

Post a Comment