I have a ASP.NET webapi project that references various class libraries(dlls) and each class library depends its own appsettings. The folder structure of the project is as shown below,
WebApiProject
|
+---- Dlls
+---- ClassLibrary1
----- classlibrary1.dll
----- classlibrary1.dll.config
+---- ClassLibrary2
----- classlibrary2.dll
----- classlibrary2.dll.config
When i include all the app settings from classlibrary1.dll.config to web.config there are no issues using classlibrary1 in webapi project. This approach falls a part when there are duplicate app settings between classlibrary1.dll.config and classlibrary2.dll.confg. I am looking something like dynamically load configuration based on the library i am about to use
Is there any way to load app settings dynamically before invoking a method from class library(dll)