Release / Debug App.configs [modified]
-
Hi Guys, I've got two config files for a winforms app: app.release.config app.debug.config I copy these into the appropriate folders using the following post build event: if $(ConfigurationName) == Debug copy "$(ProjectDir)app.debug.config" "$(TargetPath).config" if $(ConfigurationName) == Debug copy "$(ProjectDir)app.debug.config" "$(TargetDir)$(TargetName).vshost.exe.config" if $(ConfigurationName) == Release copy "$(ProjectDir)app.release.config" "$(TargetPath).config" if $(ConfigurationName) == Release copy "$(ProjectDir)app.release.config" "$(TargetDir)$(TargetName).vshost.exe.config" This works if i only build the project, but if i run the project as well, then the files are replaced by the origional app.config. If i change it to overwrite the app.config file (Either pre / post build): if $(ConfigurationName) == Debug copy "$(ProjectDir)app.debug.config" "$(ProjectDir)app.config" if $(ConfigurationName) == Release copy "$(ProjectDir)app.release.config" "$(ProjectDir)app.config" Then it overwrites the app.config file fine, but doesn't actually copy it to the output directory. Any thoughts? This should be a common problem that's got a solution right? It's driving me crazy :( Regards Tris
------------------------------- Carrier Bags - 21st Century Tumbleweed.
modified on Friday, August 14, 2009 6:17 AM