I have an EF Code First project that I compile as a C# class library dll, and I have several other projects that create executables targeting my database that keep a reference to this project. My question is, do I have to keep redundant copies of app.config in each project that uses this DB Context? I've also got separate references to Entity Framework in each application project, which appears to be necessary, even though I had hoped to encapsulate that in this one project. (I suppose I could still do that if I exposed a web service or something, instead of making all my EF classes public.)
Do I have to specify the connection string in each executable project's app.config? Does the config file for the dll project get overridden? I've got a funny feeling I'm missing something.
I did see this answer allowing inclusion of an external configuration, but it appears only to affect the appSettings section of the config file. Right now all my config files are app.config instead of web.config since my apps are all either console, desktop, or service applications, but I'm assuming the same principles apply to web apps referring to a single class library.
Update: Would it make sense to have a single app.config file which included named connection strings for each of my databases, and have each executable project point to this one via Add Existing Item (as DLeh suggests below)? If I do that, can I then use a Settings file in each executable to allow overriding which connection to use without rebuilding the project? This would reduce the number of build targets considerably I would think; otherwise I'd have the Cartesian Product of DB instances and executables.