Using ConfigurationManager With DLL Library
Posted on 2012-09-12
We have a solution which contains multiple projects. These projects utilize many shared business objects. Our thought was to create a DLL library of the classes for the business objects and reference it from the various projects.
Each of these projects has an app.settings file. We want to be able to reference settings in the project app.config file when instantiating objects and calling methods within the DLL library (i.e. the app.config for the application contains a database and server name as well as a connection string - we want these values to be used by the classes contained in the DLL library when creating database connections).
We think we should be able to read from the configuration of the calling application from within the DLL, but have been unable to find any documentation on how this is done.
Can anyone point us in the right direction to solve what must be a common issue?