app.config is a refugee!

Topics: Building and extending application blocks, General discussion
Nov 9, 2009 at 4:57 AM

I have a class library solution that uses EntLib 4.1. Now, if i add a new console application to the solution to test the working of the class library, the settings in the app.cofig need to be moved to new project. Not a very desirable situation if i am thinking of a client sitting on a user's desktop.

Is there a solution to this? Am I missing something?






Nov 9, 2009 at 5:26 AM

I'm not quite sure what do you mean here.  But I'm guessing that you want the class library to have its own app.config and independent of the host project, am I right?  As class libraries don't own configs, (executables do), you can use a FileConfigurationSource for your entlib codes in your class libraries.  This shows how it's done -


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.

Nov 9, 2009 at 5:58 AM

Your guess is absolutely right. And I apologise for having made you guess.

I should have been more clear.

I shall go through the blog.

Thanks for the reply.