I was having a look at $(Configuration)
,$(ProjectDir)
etc. in Visual Studio 2008 for Prebuild events.
Is there a link to all of these variables with a definition for each one of them?
I was having a look at $(Configuration)
,$(ProjectDir)
etc. in Visual Studio 2008 for Prebuild events.
Is there a link to all of these variables with a definition for each one of them?
To add to the other answers, note that property sheets can be configured for the project, creating custom project-specific parameters.
To access or create them navigate to(at least in Visual Studio 2013) View -> Other Windows -> Property Manager. You can also find them in the source folder as .prop files
While there does not appear to be one complete list, the following may also be helpful:
How to use Environment properties:
http://msdn.microsoft.com/en-us/library/ms171459.aspx
MSBuild reserved properties:
http://msdn.microsoft.com/en-us/library/ms164309.aspx
Well-known item properties (not sure how these are used):
http://msdn.microsoft.com/en-us/library/ms164313.aspx
Try this MSDN page: Macros for Build Commands and Properties
If you need to find values for variables other than those standard VS macros, you could do that easily using Process Explorer. Start it, find the process your Visual Studio instance runs in, right click, Properties → Environment. It lists all those $ vars as key-value pairs:![enter image description here](https://i.stack.imgur.com/RuoEV.jpg)
Anybody working on legacy software using Visual Studio 6.0 will find that $(Configuration) and $(ProjectDir) macro's are not defined. For post-build/pre-build events, give a relative path starting with the location of your .dsw file(workspace) as the starting point. In relative path dot represents the current directory and .. represents the parent directory. Give a relative path to the file that need to be processed. Example: ( copy /y .\..\..\Debug\mylib.dll .\..\MyProject\Debug\ )