views:

26

answers:

1

How do I ensure that an app.config file gets read on assembly initialization, for .Net 3.5-4 ?

It's a class library assembly. VS2008 provides a menu to add an app.config file, but it's ignored so far.

I need to use the app.config to provide information for logging from the assembly.

Thanks in advance!

A: 

A config file will only be read by an executable, not a dll.

You need to add the config to the executable that will use your dll.

If you have a test harness (Console app, nUnit test or anything like that), add the required configuration to it.

Oded