![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Handling of App.config Files in Solution with some Subprojects Hi all. I'd like to get deeper into details of project layout in visual studio. And maybee someone finds it interesting ... I've got a project with the following layout just theoretical: Solution: - Project Network (DLL) with app.config (some links to Webservices and so on) - Project Database (DLL) with app.config (ConnectionStrings and so on) - Project TestExecutable(Exe) with app.config (some Logging entries or so) When I build that solution I get just on config file in the bin/Debug folder: "TestExecutable.Exe.config" The settings in the other files are compiled into the DLLs and thanks to Lutz Roeder I can find it there in the CompilerGenerated internal sealed class Settings. Hmmm, so far so good, but ... When I like to change that value I have to open the sources, change the value and rebuild and distribute it. I made a config file for easy changeing that values ... Of course a simple workaround would be to put all admin stuff in the settings file of the Exe and tell every Dll in Constructor their settings. But I'd like to know whether there's a possibility to do that in a way I got one .config file per project on filesystem in bin/DEBUG instead of built into dll? Maybee someone finds this interesting ... Bye Barney Gumble |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Handling of App.config Files in Solution with some Subprojects In my experience, config files are useless if they are compiled into your DLL. they can't be read from there. What I do is to use the app.config in the library projects as a sample configuration, or to document the defaults. (note that SETTINGS classes do store their defaults in the library resources, but not in an embedded config file) Your EXE project will need its own copy of all the child project configurations. There's no nice way for VS to merge/update the child configurations. And even if there were, it would piss off a lot of people and prevent easy code reuse in a lot of situations where different projects need to override the library configuration in some manner. (It would be nice to have some sort of VS add-in to help with this) -- Eric Falsken Technical Evangelist: db4o http://www.db4o.com |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Re: Handling Large Numbers of Files | PowerShell | |||
| Handling DBX Files | .NET General | |||
| Solution: Config Error when conne Xbox360 to Media Center Vista | Vista General | |||
| Re-Enabling Vista's native handling of ZIP files??? | Vista General | |||
| TRYING to use XML Config files | PowerShell | |||