0

I would like to have distinct and complete web.debug.config and web.release.config files - instead of partials that transform into complete file on build or publish.

How to I associate the configuration with the file?

DFBerry
  • 1,818
  • 1
  • 19
  • 37
  • Just make it part of your release process to swap the files out. You are using an automated tool to release, right? – mason Feb 23 '17 at 20:38
  • Can you give a little more info on how to do this? I use VS 2015 Community and use the build/debug or build/release or debug/chrome. – DFBerry Feb 23 '17 at 20:58
  • That's not really an automate tool to release. I'm talking about something more formal, such as release scripts, TFS, or Octopus. – mason Feb 23 '17 at 21:00
  • How does the configuration manager know which file to use? Or is the 'build process' supposed to rename whichever file the configuration uses to web.config? – DFBerry Feb 23 '17 at 21:02
  • 1
    You just rename the file appropriately as part of your release process. For example, you might have `web.config.staging`, `web.config.production` and then you just have your script or release tool rename the file you want to use to `web.config`. If you're release from Visual Studio, that's probably a bad idea. I suggest you check out TFS or write some PowerShell scripts that you check into source control to do your releases for you. – mason Feb 23 '17 at 21:05
  • Thank you. This helped a lot. – DFBerry Feb 23 '17 at 21:11

0 Answers0