Visual Studio settings in Entlib

Topics: Enterprise Library Core
Jul 22, 2009 at 7:53 AM

I have been using Visual Studio 2008's own settings area to store my application's settings so that when I access them in C# I simply write:

string username = Properties.Settings.Default.Username;

I have been told that the project team I am working with are using Enterprise Library to manage settings but in the web.config and app.config files these settings appear very differently to the VS settings that I am using. What is more Entlib currently does not see my settings. Is there a way of editing the Visual Studio settings in Entlib?

Thanks

David

Jul 22, 2009 at 9:03 AM

Hi,

From what I've understand, You are asking if the Ent Lib can read your settings from your Visual Studio settings, say Settings.settings. If that is correct, The ent lib does not support that.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Jul 22, 2009 at 9:09 AM

That is exactly what I am saying. That is a real shame. The real advantage of the Settings.settings is that they produce compile time and not run time errors if incorrect and also that they can be different types. Nothing like that in Ent lib?

Thanks

David

Jul 22, 2009 at 9:33 AM

Ent lib also has a way to manage settings, but as far as i know it cant be of different types, it can only be a string. It comes in a key-value pair.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com