Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Release / Debug App.configs [modified]

Release / Debug App.configs [modified]

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpwinformsdebugginghelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tristan Rhodes
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups