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
Copy file name to clipboardExpand all lines: docs/build/reference/header-unit-json-reference.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
description: "Reference for header-units.json file"
3
3
title: "C++ header unit.json reference"
4
-
ms.date: 02/03/2022
4
+
ms.date: 02/11/2022
5
5
author: "tylermsft"
6
6
ms.author: "twhitney"
7
7
f1_keywords: ["header-units.json"]
@@ -14,7 +14,7 @@ The `header-units.json` file serves two purposes:
14
14
- Specify which header files can be translated into header units when [`/translateInclude`](translateinclude.md) is specified.
15
15
- Minimize duplicated symbols to increase build throughput.
16
16
17
-
This file must be in the same directory as the included header file. This file is only used when [`/translateInclude`](translateinclude.md) is specified along with either `/scanDependencies` or [`/sourceDependencies:directives`](sourcedependencies-directives.md).
17
+
This file must be in the same directory as the included header file. This file is only used when [`/translateInclude`](translateinclude.md) is specified along with either [`/scanDependencies`](scandependencies.md) or [`/sourceDependencies:directives`](sourcedependencies-directives.md).
Contains the primary target files (.targets) and property files (.props) that are used by the targets. By default, the $(VCTargetsPath) macro references this directory. The *`<version>`* placeholder refers to the Visual Studio version: v160 for Visual Studio 2019, v150 for Visual Studio 2017.
23
+
Contains the primary target files (*`.targets`*) and property files (*`.props`*) that are used by the targets. By default, the `$(VCTargetsPath)` macro references this directory. The *`<version>`* placeholder refers to the Visual Studio version: v170 for Visual Studio 2022, v160 for Visual Studio 2019, or v150 for Visual Studio 2017.
Contains the primary target files (.targets) and property files (.props) that are used by the targets. By default, the $(VCTargetsPath) macro references this directory.
57
+
Contains the primary target files (*`.targets`*) and property files (*`.props`*) that are used by the targets. By default, the $(VCTargetsPath) macro references this directory.
Contains platform-specific target and property files that override targets and properties in its parent directory. This directory also contains a DLL that defines the tasks that are used by the targets in this directory. The *`<platform>`* placeholder represents the ARM, Win32, or x64 subdirectory.
Contains the directories that enable the build to generate C++ applications by using the specified *`<toolset>`*. The *`<version>`* placeholder is V110 for Visual Studio 2012, V120 for Visual Studio 2013, and V140 for Visual Studio 2015. The *`<platform>`* placeholder represents the ARM, Win32, or x64 subdirectory. The *`<toolset>`* placeholder represents the toolset subdirectory. For example, it's v140 for building Windows apps by using the Visual Studio 2015 toolset. Or, v120_xp to build for Windows XP using the Visual Studio 2013 toolset.
The paths that enable the build to generate either Visual Studio 2008 or Visual Studio 2010 applications don't include the *`<version>`*. In those versions, the *`<platform>`* placeholder represents the Itanium, Win32, or x64 subdirectory. The *`<toolset>`* placeholder represents the v90 or v100 toolset subdirectory.
70
70
@@ -74,13 +74,13 @@ The support file directories contain files with these extensions:
74
74
75
75
| Extension | Description |
76
76
| --------- | ----------- |
77
-
|*`.targets`*| Contains `Target` XML elements that specify the tasks that are executed by the target. May also contain `PropertyGroup`, `ItemGroup`, `ItemDefinitionGroup`, and user-defined `Item` elements that are used to assign files and command-line options to task parameters.<br /><br /> For more information, see [Target Element (MSBuild)](/visualstudio/msbuild/target-element-msbuild). |
78
-
|*`.props`*| Contains `Property Group` and user-defined `Property` XML elements that specify file and parameter settings that are used during a build.<br /><br /> May also contain `ItemDefinitionGroup` and user-defined `Item` XML elements that specify additional settings. Items defined in an item definition group resemble properties, but can't be accessed from the command line. Visual Studio project files frequently use items instead of properties to represent settings.<br /><br /> For more information, see [ItemGroup Element (MSBuild)](/visualstudio/msbuild/itemgroup-element-msbuild), [ItemDefinitionGroup Element (MSBuild)](/visualstudio/msbuild/itemdefinitiongroup-element-msbuild), and [Item Element (MSBuild)](/visualstudio/msbuild/item-element-msbuild). |
77
+
|*`.targets`*| Contains `Target` XML elements that specify the tasks that are executed by the target. May also contain `PropertyGroup`, `ItemGroup`, `ItemDefinitionGroup`, and user-defined `Item` elements that are used to assign files and command-line options to task parameters.<br /><br /> For more information, see [`Target` Element (MSBuild)](/visualstudio/msbuild/target-element-msbuild). |
78
+
|*`.props`*| Contains `Property Group` and user-defined `Property` XML elements that specify file and parameter settings that are used during a build.<br /><br /> May also contain `ItemDefinitionGroup` and user-defined `Item` XML elements that specify additional settings. Items defined in an item definition group resemble properties, but can't be accessed from the command line. Visual Studio project files frequently use items instead of properties to represent settings.<br /><br /> For more information, see [`ItemGroup` Element (MSBuild)](/visualstudio/msbuild/itemgroup-element-msbuild), [`ItemDefinitionGroup` Element (MSBuild)](/visualstudio/msbuild/itemdefinitiongroup-element-msbuild), and [`Item` Element (MSBuild)](/visualstudio/msbuild/item-element-msbuild). |
79
79
|*`.xml`*| Contains XML elements that declare and initialize IDE user interface elements. For example, property sheets, property pages, textbox controls, and listbox controls.<br /><br /> The *`.xml`* files directly support the IDE, not MSBuild. However, the values of IDE properties are assigned to build properties and items.<br /><br /> Most *`.xml`* files are in a locale-specific subdirectory. For example, files for the English-US region are in `$(VCTargetsPath)\1033\`. |
80
80
81
81
## User targets and properties
82
82
83
-
To use MSBuild effectively, it helps to know which properties and targets are useful and relevant. Most properties and targets help implement the Visual Studio build system, and consequently aren't relevant to the user. This section describes user-oriented properties and targets worth knowing about.
83
+
To use MSBuild effectively, it helps to know which properties and targets are useful and relevant. Most properties and targets help implement the Visual Studio build system, and aren't relevant to the user. This section describes user-oriented properties and targets worth knowing about.
84
84
85
85
### `PlatformToolset` property
86
86
@@ -100,7 +100,7 @@ For example, set the `PreferredToolArchitecture` property to `x64` to use the 64
100
100
101
101
### `UseEnv` property
102
102
103
-
By default, the platform-specific settings for the current project override the PATH, INCLUDE, LIB, LIBPATH, CONFIGURATION, and PLATFORM environment variables. Set the `UseEnv` property to **`true`** to guarantee that the environment variables don't get overridden.
103
+
By default, the platform-specific settings for the current project override the `PATH`, `INCLUDE`, `LIB`, `LIBPATH`, `CONFIGURATION`, and `PLATFORM` environment variables. Set the `UseEnv` property to **`true`** to guarantee that the environment variables don't get overridden.
104
104
105
105
> `msbuild myProject.vcxproj /p:UseEnv=true`
106
106
@@ -112,33 +112,33 @@ The following table lists several useful user-oriented targets.
112
112
113
113
| Target | Description |
114
114
| ------ | ----------- |
115
-
| BscMake | Executes the Microsoft Browse Information Maintenance Utility tool, bscmake.exe. |
116
-
| Build | Builds the project.<br /><br /> This target is the default for a project. |
117
-
| ClCompile | Executes the MSVC compiler tool, cl.exe. |
118
-
| Clean | Deletes temporary and intermediate build files. |
119
-
| Lib | Executes the Microsoft 32-Bit Library Manager tool, lib.exe. |
120
-
| Link | Executes the MSVC linker tool, link.exe. |
121
-
| ManifestResourceCompile | Extracts a list of resources from a manifest and then executes the Microsoft Windows Resource Compiler tool, rc.exe. |
122
-
| Midl | Executes the Microsoft Interface Definition Language (MIDL) compiler tool, midl.exe. |
123
-
| Rebuild | Cleans and then builds your project. |
124
-
| ResourceCompile | Executes the Microsoft Windows Resource Compiler tool, rc.exe. |
125
-
| XdcMake | Executes the XML Documentation tool, xdcmake.exe. |
126
-
| Xsd | Executes the XML Schema Definition tool, xsd.exe. *See note.*|
115
+
|`BscMake`| Executes the Microsoft Browse Information Maintenance Utility tool, *`bscmake.exe`*. |
116
+
|`Build`| Builds the project.<br /><br /> This target is the default for a project. |
117
+
|`ClCompile`| Executes the MSVC compiler tool, *`cl.exe`*. |
118
+
|`Clean`| Deletes temporary and intermediate build files. |
119
+
|`Lib`| Executes the Microsoft 32-Bit Library Manager tool, *`lib.exe`*. |
120
+
|`Link`| Executes the MSVC linker tool, *`link.exe`*. |
121
+
|`ManifestResourceCompile`| Extracts a list of resources from a manifest and then executes the Microsoft Windows Resource Compiler tool, *`rc.exe`*. |
122
+
|`Midl`| Executes the Microsoft Interface Definition Language (MIDL) compiler tool, *`midl.exe`*. |
123
+
|`Rebuild`| Cleans and then builds your project. |
124
+
|`ResourceCompile`| Executes the Microsoft Windows Resource Compiler tool, *`rc.exe`*. |
125
+
|`XdcMake`| Executes the XML Documentation tool, *`xdcmake.exe`*. |
126
+
|`Xsd`| Executes the XML Schema Definition tool, *`xsd.exe`*. *See note.*|
127
127
128
128
> [!NOTE]
129
-
> In Visual Studio 2017 and later, C++ project support for **xsd** files is deprecated. You can still use **Microsoft.VisualC.CppCodeProvider** by adding **CppCodeProvider.dll** manually to the GAC.
129
+
> In Visual Studio 2017 and later, C++ project support for *`.xsd`* files is deprecated. You can still use `Microsoft.VisualC.CppCodeProvider` by adding *`CppCodeProvider.dll`* manually to the GAC.
Copy file name to clipboardExpand all lines: docs/build/reference/translateinclude.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "/translateInclude"
3
3
description: "Use the /translateInclude compiler option to treat #include directives as import statements when an importable header unit is available."
4
-
ms.date: 02/01/2022
4
+
ms.date: 02/11/2022
5
5
author: "tylermsft"
6
6
ms.author: "twhitney"
7
7
f1_keywords: ["/translateInclude"]
@@ -11,7 +11,7 @@ helpviewer_keywords: ["/translateInclude", "Translate include directives into im
11
11
12
12
This switch instructs the compiler to treat `#include` as `import` for header files that have been built into header unit (`.ifc`) files and that are specified on the command line with [`/headerUnit`](headerunit.md).
13
13
14
-
When used with `/scanDependencies` or [`/sourceDependencies-directives`](sourcedependencies-directives.md), the compiler lists as imported header units in the generated dependency file those headers that are both included in the source and have a corresponding entry in a `header-units.json` file. This dependency info is used by the build system to generate compiled header unit `.ifc` files. Once the header units are built, they're treated by the compiler as an `import` instead of an `#include`.
14
+
When used with [`/scanDependencies`](scandependencies.md) or [`/sourceDependencies-directives`](sourcedependencies-directives.md), the compiler lists as imported header units in the generated dependency file those headers that are both included in the source and have a corresponding entry in a `header-units.json` file. This dependency info is used by the build system to generate compiled header unit `.ifc` files. Once the header units are built, they're treated by the compiler as an `import` instead of an `#include`.
15
15
16
16
The `header-units.json` file is only consulted when `/translateInclude` is specified. For more information about the format and purpose of the `header-units.json` file, see [`header-units.json`](header-unit-json-reference.md).
17
17
@@ -41,5 +41,6 @@ To enable `/translateInclude`, in the project properties dialog, set **Translate
41
41
[`/headerUnit` (Use header unit IFC)](headerunit.md).\
0 commit comments