Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of $(OutDir)

Tags:

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

like image 897
Programmer Avatar asked Jun 17 '12 20:06

Programmer


People also ask

What is $( SolutionDir?

$(SolutionDir)The directory of the solution (defined as drive + path); includes the trailing backslash '\'.

Where are Visual Studio macros stored?

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.


2 Answers

$(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).

like image 86
pb2q Avatar answered Sep 27 '22 17:09

pb2q


These macros are documented by Microsoft in the topic Macros for Build Commands and Properties. (That link is for Visual Studio 2015.)

like image 44
Phil Jollans Avatar answered Sep 27 '22 15:09

Phil Jollans