Meaning of $(OutDir)

environment-variables, msbuild, visual-studio

Solution

`$(OutDir)` is a Visual Studio Build Property Macro.

You can see the values of macros using the Macros >> button in many Properties dialogs.

For instance, in Properties->General->Output Directory, click the dropdown in the value text box, choose Edit..., and in the resulting dialog, click the Macros >> button. This will give you a list of all the macros and their current values.

`$(OutputDir)` should be set to the output directory for the current configuration, e.g. `$(SolutionDir)/$(Configuration)\`.

Note that your Windows environment variables are imported as Build Property macros in your project, so in the marco list you'll see, e.g. `$(Path)`, `$(HOME)`, `$(TEMP)`.

Problem

I was looking in the properties of my visual studio project and saw the following: ``` $(OutDir)\$(ProjectName).exe ``` I was curious how does visual studio know the value of outdir and how can i see this value. Moreover, which language is this, eg C#, python? In other words, what language is `$(OutDir)\$(ProjectName).exe` written in

Original source