I've got Enterprise Library all wired up now in my Windows Service LDAPContacts Project I've created and also in the UnitTests project. I use a pre-build event found in the 'Project properties | Common Properties | Build Events' section. So when I rebuild my solution it automatically fires off and copies the main configuration file to my Unit Tests project rather than me keeping two copies. It's handy to do this because I point to all my config files by full path e.g. for the dataconfiguration.config to save having multiple copies of the same thing flying around. The example command is below:
copy "$(ProjectDir)..\LDAPContacts\ldapcontacts.exe.config" "$(TargetDir)UnitTests.dll.config"
I have also written a Windows Application to allow me to create my config files for each MachineName instance I require. The reason for this is they are encrypted, so I have a Text Box for each setting. I have tried to add a pre-build event to this project but for some reason it just isn't copying the file in there!
copy "$(ProjectDir)..\LDAPContacts\ldapcontacts.exe.config" "$(TargetDir)SettingsConfigManager.exe.config"
This will continue to bug me until I fix it...has anyone got any ideas?
UPDATE
I was jumping down the wrong holes...but I'm glad I found the pre-build feature. I've now renamed the ldapcontacts.exe.config in the LDAPContacts Project to app.config and then linked these in Source Safe in the other two projects directories and added them to my projects in Visual Studio. That way they are kept up to date and when you do a build Visual Studio automatically copies the app.config to the target directory and renames them accordingly anyway.