Dave Burke : Freelance .NET Web Developer specializing in Online Communities

ConfigurationManager.AppSettings in Beta 2.0

The ConfigurationSettings.AppSettings class became obsolete in Beta 2.0, replaced by System.Configuration.ConfigurationManager.AppSettings.  This stumped me, because ConfigurationManager was nowhere to be found.  You have to add a project reference to System.Configuration for it to show up.  Here's the google thread.  Thank you, Brett Hobbs.

Another tip on using AppSettings in Windows Forms Beta 2.0 is to put configuration values you want to read with ConfigurationSettings.AppSettings[] in the good ol' appSettings area, which you'll probably have to create.  I tried to place them in the applicationSettings section and kept getting null object reference errors.

Golly.  Now that I figured that out I can walk the dogs.  They've been ticked at me for the last hour after I told them I couldn't do something as basic as read from an application config file.  That look of disgust in their eyes...

Comments (4) | Post RSS RSS comment feed

Posted on 5/13/2005 3:52:00 AM by Dave Burke
Categories: .NET
Tags:

Related posts

Comments (4) -

5/17/2005 5:52:51 PM Permalink

Thanks Dave, this saved my a** (or at least some time)!

Scott Elkin |

5/17/2005 6:09:11 PM Permalink

And your comment made my day.  Thanks, Scott.

daveburke |

5/24/2005 5:23:24 PM Permalink

Thanks. Any idea how to actually read the applicationSettings from a DLL?

David Robinson |

5/25/2005 5:13:03 AM Permalink

No I don't David.  I saw this great article on using the MY feature in VB.NET 2005, not available for C#.  I don't think that's what you're talking about though.  There's also a new Application class where we can "stick stuff."  I want to find more about that.

daveburke |


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke