You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Common macros for MSBuild commands and properties
9
9
10
-
Depending on your installation options, Visual Studio can make hundreds of macros available to you. These correspond to the MSBuild properties that are set by default, or in .props or .targets files, or in your project settings. You can use these macros anywhere in a project's **Property Pages** dialog box where strings are accepted. These macros are not case sensitive.
10
+
Depending on your installation options, Visual Studio can make hundreds of macros available to you in a Visual Studio project (based on MSBuild). These correspond to the MSBuild properties that are set by default, or in .props or .targets files, or in your project settings. You can use these macros anywhere in a project's **Property Pages** dialog box where strings are accepted. These macros are not case sensitive.
11
11
12
12
## View the current properties and macros
13
13
14
-
To display the currently available macros, on any property page in the **Property Pages** dialog, choose the drop-down arrow at the end of a property row. If **Edit** is available, choose it, and then in the edit dialog box, choose the **Macros** button. The current set of properties and macros visible to Visual Studio is listed along with the current value for each. For more information, see the **Specifying User-Defined Values** section of [C++ project property page reference](property-pages-visual-cpp.md).
14
+
To display all of the currently available macros, in the **Property Pages** dialog, under **VC++ Directories**, choose the drop-down arrow at the end of a property row. Click on **Edit** and then in the edit dialog box, choose the **Macros** button. The current set of properties and macros visible to Visual Studio is listed along with the current value for each. For more information, see the **Specifying User-Defined Values** section of [C++ project property page reference](property-pages-visual-cpp.md).
This table describes a commonly used subset of the available macros. This list is far from exhaustive. For details on how MSBuild property definitions are created and used as macros in .props, .targets, and .vcxproj files, see [MSBuild Properties](/visualstudio/msbuild/msbuild-properties).
20
+
This table describes a commonly used subset of the available macros; there are many more not listed here. Go to the **Macros** dialog to see all of the properties and their current values in your project. For details on how MSBuild property definitions are created and used as macros in .props, .targets, and .vcxproj files, see [MSBuild Properties](/visualstudio/msbuild/msbuild-properties).
19
21
20
22
|Macro|Description|
21
23
|-----------|-----------------|
@@ -28,6 +30,7 @@ This table describes a commonly used subset of the available macros. This list i
28
30
|**$(IntDir)**|Path to the directory specified for intermediate files. If this is a relative path, intermediate files go to this path appended to the project directory. This path should have a trailing slash. This resolves to the value for the **Intermediate Directory** property. Do not use **$(OutDir)** to define this property.|
29
31
|**$(OutDir)**|Path to the output file directory. If this is a relative path, output files go to this path appended to the project directory. This path should have a trailing slash. This resolves to the value for the **Output Directory** property. Do not use **$(IntDir)** to define this property.|
30
32
|**$(Platform)**|The name of current project platform, for example, "Win32".|
33
+
|**$(PlatformShortName)**|The short name of current architecture, for example, "x86" or "x64".|
31
34
|**$(ProjectDir)**|The directory of the project (defined as drive + path); includes the trailing backslash '\\'.|
32
35
|**$(ProjectExt)**|The file extension of the project. It includes the '.' before the file extension.|
33
36
|**$(ProjectFileName)**|The file name of the project (defined as base name + file extension).|
0 commit comments