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. Visual Studio
  4. Using varibles with post build events

Using varibles with post build events

Scheduled Pinned Locked Moved Visual Studio
csharpvisual-studiotutorial
2 Posts 2 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.
  • M Offline
    M Offline
    MKlucher
    wrote on last edited by
    #1

    I have a post build event set up that copies a file to a specific directory, what I would like to do it see if there is some way to set up a varible that I can easy change for all the post build events in my solution Visual studio has some set up like ($OutDir) and stuff, so I am just wondering how to make/use my own.

    F 1 Reply Last reply
    0
    • M MKlucher

      I have a post build event set up that copies a file to a specific directory, what I would like to do it see if there is some way to set up a varible that I can easy change for all the post build events in my solution Visual studio has some set up like ($OutDir) and stuff, so I am just wondering how to make/use my own.

      F Offline
      F Offline
      feline_dracoform
      wrote on last edited by
      #2

      theoretically all you need to do is: go to control panel -> system -> advanced tab -> environment variables now add a new variable, either to system or user. you can now reference this variable via the same ($OutDir) syntax in Visual Studio. we do this where i work, but the IDE only picks up the variable some of the time on my machine :doh: there doesn't seem to be any pattern to this, and since our variable ($QTDIR) never changes i simply replace it with the actual path when ever .NET 2003 starts complaining about being unable to find it. also, you may have to reboot your machine before the variable is correctly detected. worth a try, in case it works more reliably for you :)

      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