Using varibles with post build events
-
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.
-
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.
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 :)