Calendar

<<  January 2009  >>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Recent posts

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009

Sign in

Missing ConfigurationManager

by HyperbolicHyperbally 1/10/2008 10:01:00 PM

In .Net 2.0 your supposed to use the Configuration manager instead of the old depreciated ConfigSettings class.  However, your code if you only add a using statement to the System.Configuration namespace you will only have access to the deprecated ConfigSettings class. When I was studying for my MCTS, the core book really pushed using the Configuration Manager, but when I actually try and apply it on the job, I couldn't get it to work. Thanks to Kieran Lynam I finally figured out why I can never find the ConfiurationManager class.

What you need to do is actually add (not just a using/imports statement) a reference to the System.Configuration dll to your project and then you'll magically have access to all the new features of .Net 2.0 configuration.

I have no idea why they make you go through this extra step, unless it was for backwards compatibility. You'd think that without the reference you wouldn't get access to anything in the Configuration namespace, but for some strange reason Microsoft has not chosen this all or nothing approach. In fact you'd expect that they'd want you to use the new versions and include that by default and make you hunt for the old depreciated versions, but then we'd live in a world that makes sense.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Code

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

1/6/2009 5:31:44 PM

Powered by BlogEngine.NET 1.3.0.0