I have a class library that has settings within an app.config.
I know that any project that uses this library needs to have settings in it own app.config.
Is there any way to bring the settings from the library as a template/default configuration settings?
I want to give the project a starting point, but also allow for them to override for a specific configuration for their needs.
I would appreciate the help!
I have also needed to do this in the past; what I recall from the research I did at the time it is not possible to mark the file as "required" and copy along with the reference. The advice from other forums and MSDN was to manually merge the
App.configfiles in the final location.The solution I ended up using as a post-build script on the start-up/default project that
XCOPYtheApp.Configfile into the correct target directory. This worked well for my situation as I already had a post-build script in place to do other tasks.If there is indeed a better/cleaner solution I would be interested to hear it.
Edit: Below is a cut-down version of my post-build script.