Calendar

<<  March 2010  >>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

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 2010

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

Comments

3/23/2009 10:41:36 PM

Slim Fit Blog

Can I know who is your inspiration to do this wonderful post? And thenm can you explain further your theme webmaster? Thanks...

Slim Fit Blog us

3/24/2009 12:56:51 AM

Ground River

your post is great and i appreciate thanks for sharing and i learn something new today.

Ground River us

Add comment


(Will show your Gravatar icon)  

  Country flag

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



Live preview

3/16/2010 1:03:28 PM

Powered by BlogEngine.NET 1.3.0.0