views:

50

answers:

1

I am working with v4 of the Enterprise Application block and I am trying to learn how to access the Application Settings that I have added using the Enterprise Library Configuration tool. It's as if the code does not recognize the settings even though I can see them in the app.config. I DO have a Settings.Settings designer added and I CAN get to those settings the standard way even though the settings added in that designer do NOT show up in the app.config like they normally would if I am NOT using the Enterprise Block

How do I access the App Settings that I added with the Enterprise Block?

+1  A: 

Add reference to System.Configuration

Use ConfigurationManager.AppSettings["settingname"].ToString() to access your application settings, if you have multiple projects then add the main project app.config to other projects as a link.

Milan Solanki