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. Windows Forms
  4. Setting exe name according to project configuration in VS.NET 2005 [modified]

Setting exe name according to project configuration in VS.NET 2005 [modified]

Scheduled Pinned Locked Moved Windows Forms
csharpvisual-studioworkspace
2 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.
  • A Offline
    A Offline
    abcxyz82
    wrote on last edited by
    #1

    I have windows form application project named foo and I have created two solution/project configurations namely foo_STD and foo_PROF. Now, when I build all configurations It generates two folders under bin i.e. foo_STD and foo_PROF and executable created in both folder has name foo.exe Is there any way to change executable name through Post-Build/Command line parameters in project configuration so, that foo_STD.exe is created in foo_STD directory and foo_PROF.exe is created in foo_PROF directory.

    Regards, MaulikCE

    modified on Tuesday, July 22, 2008 12:38 PM

    A 1 Reply Last reply
    0
    • A abcxyz82

      I have windows form application project named foo and I have created two solution/project configurations namely foo_STD and foo_PROF. Now, when I build all configurations It generates two folders under bin i.e. foo_STD and foo_PROF and executable created in both folder has name foo.exe Is there any way to change executable name through Post-Build/Command line parameters in project configuration so, that foo_STD.exe is created in foo_STD directory and foo_PROF.exe is created in foo_PROF directory.

      Regards, MaulikCE

      modified on Tuesday, July 22, 2008 12:38 PM

      A Offline
      A Offline
      abcxyz82
      wrote on last edited by
      #2

      I found the solution from here- http://www.fearlessdog.com/posts/2005/03/04/net-post-build-script-to-rename-appconfig Here's the exact copy-paste script to set executable name according to project configuration Paste the following in "Post-build event command line"

      rename $(TargetFileName) $(ConfigurationName)$(TargetExt)
      rename $(TargetFileName).config $(ConfigurationName)$(TargetExt).config

      and

      select "When build updates the project output" in "Run the Post-build event:" dropdown.

      then hit -F6 to build the solution.

      Regards, MaulikCE

      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