Frequently I need to create a .Net class library that requires an app.config for things such as database connection strings. However, these settings must be in the calling a
Create your class library in a different solution. If you keep them in the same solution, the app.config at the highest hierarchy will get read instead.
It is no (big) problem to use its own config file for every class library. If you use vb.net you can add values via the "my project" panel on the "Settings" page.
The only thing you have to do is to call "My.Settings.Save" on your class library settings (and not only on your main application settings file).
That works with c#, too (But probably needs more manual work).
One thing you could do is to have a seperate settings file just for your library, then you only have to have a reference to it in your entry apps config file.
See the accepted answer in this question for information on this.
Go to App properties -> Settings tab; add your settings there.
Use Properties.Settings.Default.<SettingName>
to access the setting. That's it!
Have each class library define configuration settings in a custom ConfigurationSection.
Then add custom section handlers to your process.exe.config file.
This MSDN article is pretty comprehensive in its explanation, with examples in both VB and C#.
It involves writing some pretty repetitive code - Dmitryr has created this tool to generate the config sections from a fragment of a XML configuration, which might help.
I know it's not what you want to hear, but the entry point's config file is the logical place to put these setttings. If every library required its own config file then it would get tedious to have to edit every single file instead of just one.
I would have a text file with the default settings included as part of your library (and as part of the project) which can be distributed with the library for the default settings configuration (it can be copied and pasted into the config file).