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
$(SolutionDir)The directory of the solution (defined as drive + path); includes the trailing backslash '\'.
A user-defined macro is stored in a property sheet. If your project doesn't already contain a property sheet, you can create one by following the steps under Share or reuse Visual Studio project settings.
$(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)
.
These macros are documented by Microsoft in the topic Macros for Build Commands and Properties. (That link is for Visual Studio 2015.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With