Skip to content

Commit 292c454

Browse files
Taojunshen3836425+corob-msft@users.noreply.github.comopbld16TylerMSFTTylerMSFT
authored
2/14/2021 AM Publish (#4097)
* Change __STDC__ documentation for 17.2 * Twhitney updateui (#4082) * update ui steps * simplify * fix formatting * try a note * formatting * bridge the note * edits * edits * acrolinx * Update docs/build/walkthrough-header-units.md Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> * Fix link to CreateProcess function * Update exception-handling-x64.md * US1907300 - add md code escapes to code elements - PR9 * Address cpp-docs 3691, 3688, 3684, 3664 (MicrosoftDocs#4085) * [17.2p1] Add /scanDependencies option to docs (MicrosoftDocs#4059) * Add /scanDependencies option to docs * Acrolinx pass * Updates per review by Cameron * Consistency of command option formatting * Add IDE instructions * Tweaks per comments. * US1907300 - add md code escapes to code elements - PR7 (MicrosoftDocs#4076) * US1907300 - add md code escapes to code elements - PR7 * US1907300 - add md code escapes to code elements - PR7 * updates after review * updates after review * updates after review * updates after review * updates after review * US1907300 - add md code escapes to code elements - PR8 (MicrosoftDocs#4080) * US1907300 - add md code escapes to code elements - PR8 * updates after review * updates after review * updates after review * fix blocking issue * Address DD 1462641 (MicrosoftDocs#4086) * US1907300 - add md code escapes to code elements - PR9 * fix formatting issue * US1907300 - add md code escapes to code elements - PR10 * updates after review * updates after review * updates after review * updates after review * updates after review * Update what-s-new-for-visual-cpp-in-visual-studio.md fix typo * add links (#4094) Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Address cpp-docs 3694, 3696 (#4091) Co-authored-by: 3836425+corob-msft@users.noreply.github.com <corob@microsoft.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> Co-authored-by: ishchukin <78567572+ishchukin@users.noreply.github.com> Co-authored-by: p4yl0ad <57832389+p4yl0ad@users.noreply.github.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Craig Casey <17149610+craigcaseyMSFT@users.noreply.github.com> Co-authored-by: PRMerger9 <prmrgr9@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: Dennis Rea <v-denrea@microsoft.com> Co-authored-by: jason <drvoss@gmail.com>
1 parent 67b10ce commit 292c454

File tree

5 files changed

+93
-92
lines changed

5 files changed

+93
-92
lines changed

docs/build/reference/header-unit-json-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Reference for header-units.json file"
33
title: "C++ header unit.json reference"
4-
ms.date: 02/03/2022
4+
ms.date: 02/11/2022
55
author: "tylermsft"
66
ms.author: "twhitney"
77
f1_keywords: ["header-units.json"]
@@ -14,7 +14,7 @@ The `header-units.json` file serves two purposes:
1414
- Specify which header files can be translated into header units when [`/translateInclude`](translateinclude.md) is specified.
1515
- Minimize duplicated symbols to increase build throughput.
1616

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).
1818

1919
## Rationale
2020

docs/build/reference/msbuild-visual-cpp-overview.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "MSBuild internals for C++ projects in Visual Studio"
33
description: "The support files, properties, and targets used by MSBuild for Visual Studio C++ projects."
4-
ms.date: 10/14/2020
4+
ms.date: 02/10/2022
55
helpviewer_keywords: ["MSBuild overview"]
66
---
77
# MSBuild internals for C++ projects
@@ -16,11 +16,11 @@ By default, the primary Visual Studio support files are located in the following
1616

1717
::: moniker range=">=msvc-160"
1818

19-
### Visual Studio 2019
19+
### Visual Studio 2022 and 2019
2020

2121
- *`%VSINSTALLDIR%MSBuild\Microsoft\VC\<version>\`*
2222

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: 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.
2424

2525
- *`%VSINSTALLDIR%MSBuild\Microsoft\VC\<version>\Platforms\<platform>\`*
2626

@@ -52,19 +52,19 @@ By default, the primary Visual Studio support files are located in the following
5252

5353
### Visual Studio 2015 and earlier
5454

55-
- *`<drive>:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\<version>\`*
55+
- *`<drive>:\Program Files[ (x86)]\MSBuild\Microsoft.Cpp\v4.0\<version>\`*
5656

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.
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.
5858

59-
- *`<drive>:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\<version>\Platforms\<platform>\`*
59+
- *`<drive>:\Program Files[ (x86)]\MSBuild\Microsoft.Cpp\v4.0\<version>\Platforms\<platform>\`*
6060

6161
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.
6262

63-
- *`<drive>:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\<version>\Platforms\<platform>\PlatformToolsets\<toolset>\`*
63+
- *`<drive>:\Program Files[ (x86)]\MSBuild\Microsoft.Cpp\v4.0\<version>\Platforms\<platform>\PlatformToolsets\<toolset>\`*
6464

6565
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.
6666

67-
- *`<drive>:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\<platform>\PlatformToolsets\<toolset>\`*
67+
- *`<drive>:\Program Files[ (x86)]\MSBuild\Microsoft.Cpp\v4.0\Platforms\<platform>\PlatformToolsets\<toolset>\`*
6868

6969
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.
7070

@@ -74,13 +74,13 @@ The support file directories contain files with these extensions:
7474

7575
| Extension | Description |
7676
| --------- | ----------- |
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). |
7979
| *`.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\`. |
8080

8181
## User targets and properties
8282

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.
8484

8585
### `PlatformToolset` property
8686

@@ -100,7 +100,7 @@ For example, set the `PreferredToolArchitecture` property to `x64` to use the 64
100100

101101
### `UseEnv` property
102102

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.
104104

105105
> `msbuild myProject.vcxproj /p:UseEnv=true`
106106
@@ -112,33 +112,33 @@ The following table lists several useful user-oriented targets.
112112

113113
| Target | Description |
114114
| ------ | ----------- |
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.* |
127127

128128
> [!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.
130130
131131
## See also
132132

133-
[MSBuild Task Reference](/visualstudio/msbuild/msbuild-task-reference)\
134-
[BscMake Task](/visualstudio/msbuild/bscmake-task)\
135-
[CL Task](/visualstudio/msbuild/cl-task)\
136-
[CPPClean Task](/visualstudio/msbuild/cppclean-task)\
137-
[LIB Task](/visualstudio/msbuild/lib-task)\
138-
[Link Task](/visualstudio/msbuild/link-task)\
139-
[MIDL Task](/visualstudio/msbuild/midl-task)\
140-
[MT Task](/visualstudio/msbuild/mt-task)\
141-
[RC Task](/visualstudio/msbuild/rc-task)\
142-
[SetEnv Task](/visualstudio/msbuild/setenv-task)\
143-
[VCMessage Task](/visualstudio/msbuild/vcmessage-task)\
144-
[XDCMake Task](/visualstudio/msbuild/xdcmake-task)
133+
[MSBuild task reference](/visualstudio/msbuild/msbuild-task-reference)\
134+
[`BscMake` task](/visualstudio/msbuild/bscmake-task)\
135+
[`CL` task](/visualstudio/msbuild/cl-task)\
136+
[`CPPClean` task](/visualstudio/msbuild/cppclean-task)\
137+
[`LIB` task](/visualstudio/msbuild/lib-task)\
138+
[`Link` task](/visualstudio/msbuild/link-task)\
139+
[`MIDL` task](/visualstudio/msbuild/midl-task)\
140+
[`MT` task](/visualstudio/msbuild/mt-task)\
141+
[`RC` task](/visualstudio/msbuild/rc-task)\
142+
[`SetEnv` task](/visualstudio/msbuild/setenv-task)\
143+
[`VCMessage` task](/visualstudio/msbuild/vcmessage-task)\
144+
[`XDCMake` task](/visualstudio/msbuild/xdcmake-task)

docs/build/reference/translateinclude.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "/translateInclude"
33
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
55
author: "tylermsft"
66
ms.author: "twhitney"
77
f1_keywords: ["/translateInclude"]
@@ -11,7 +11,7 @@ helpviewer_keywords: ["/translateInclude", "Translate include directives into im
1111

1212
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).
1313

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`.
1515

1616
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).
1717

@@ -41,5 +41,6 @@ To enable `/translateInclude`, in the project properties dialog, set **Translate
4141
[`/headerUnit` (Use header unit IFC)](headerunit.md).\
4242
[`/exportHeader` (Create header units)](module-exportheader.md)\
4343
[`/reference` (Use named module IFC)](module-reference.md)\
44+
[`/scanDependencies`](scandependencies.md)\
4445
[`/sourceDependencies-directives`](sourcedependencies-directives.md)\
4546
[Walkthrough: Build and import header units in Microsoft Visual C++](../walkthrough-header-units.md)

0 commit comments

Comments
 (0)