Skip to content

Commit 96c7e9c

Browse files
committed
acrolinx
1 parent e864f6f commit 96c7e9c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/msbuild/incremental-builds.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.workload:
1616
# Incremental builds
1717
Incremental builds are builds that are optimized so that targets that have output files that are up-to-date with respect to their corresponding input files are not executed. A target element can have both an `Inputs` attribute, which indicates what items the target expects as input, and an `Outputs` attribute, which indicates what items it produces as output. MSBuild attempts to find a 1-to-1 mapping between the values of these attributes. If a 1-to-1 mapping exists, MSBuild compares the time stamp of every input item to the time stamp of its corresponding output item. Output files that have no 1-to-1 mapping are compared to all input files. An item is considered up-to-date if its output file is the same age or newer than its input file or files.
1818

19-
If all output items are up-to-date, MSBuild skips the target. This *incremental build* of the target can significantly improve the build speed. If only some files are up-to-date, MSBuild executes the target but skips the up-to-date items, and thereby brings all items up-to-date. This is known as a *partial incremental build*.
19+
If all output items are up-to-date, MSBuild skips the target. This *incremental build* of the target can significantly improve the build speed. If only some files are up-to-date, MSBuild executes the target but skips the up-to-date items, and thereby brings all items up-to-date. This process is known as a *partial incremental build*.
2020

2121
1-to-1 mappings are typically produced by item transformations. For more information, see [Transforms](../msbuild/msbuild-transforms.md).
2222

@@ -30,16 +30,16 @@ Incremental builds are builds that are optimized so that targets that have outpu
3030
</Target>
3131
```
3232

33-
The set of files represented by the `Compile` item type are copied to a backup directory. The backup files have the *.bak* file name extension. If the files represented by the `Compile` item type, or the corresponding backup files, are not deleted or modified after the Backup target is run, then the Backup target is skipped in subsequent builds.
33+
The set of files represented by the `Compile` item type is copied to a backup directory. The backup files have the *.bak* file name extension. If the files represented by the `Compile` item type, or the corresponding backup files, are not deleted or modified after the Backup target is run, then the Backup target is skipped in subsequent builds.
3434

3535
## Output inference
36-
MSBuild compares the `Inputs` and `Outputs` attributes of a target to determine whether the target has to execute. Ideally, the set of files that exists after an incremental build is completed should remain the same whether or not the associated targets are executed. Because properties and items that are created or altered by tasks can affect the build, MSBuild must infer their values even if the target that affects them is skipped. This is known as *output inference*.
36+
MSBuild compares the `Inputs` and `Outputs` attributes of a target to determine whether the target has to execute. Ideally, the set of files that exists after an incremental build is completed should remain the same whether or not the associated targets are executed. Because properties and items that are created or altered by tasks can affect the build, MSBuild must infer their values even if the target that affects them is skipped. This process is known as *output inference*.
3737

3838
There are three cases:
3939

4040
- The target has a `Condition` attribute that evaluates to `false`. In this case, the target is not run, and has no effect on the build.
4141

42-
- The target has out-of-date outputs and is run to bring them up to date.
42+
- The target has out-of-date outputs and is run to bring them up-to-date.
4343

4444
- The target has no out-of-date outputs and is skipped. MSBuild evaluates the target and makes changes to items and properties as if the target had been run.
4545

@@ -51,15 +51,15 @@ To support incremental compilation, tasks must ensure that the `TaskParameter` a
5151
</CreateProperty>
5252
```
5353

54-
This creates the property Easy, which has the value "123" whether or not the target is executed or skipped.
54+
This code creates the property Easy, which has the value "123" whether or not the target is executed or skipped.
5555

5656
```xml
5757
<CreateItem Include="a.cs;b.cs">
5858
<Output ItemName="Simple" TaskParameter="Include" />
5959
</CreateItem>
6060
```
6161

62-
This creates the item type Simple, which has two items, *a.cs* and *b.cs*, whether or not the target is executed or skipped.
62+
This code creates the item type Simple, which has two items, *a.cs* and *b.cs*, whether or not the target is executed or skipped.
6363

6464
Starting in MSBuild 3.5, output inference is performed automatically on item and property groups in a target. `CreateItem` tasks are not required in a target and should be avoided. Also, `CreateProperty` tasks should be used in a target only to determine whether a target has been executed.
6565

@@ -72,7 +72,7 @@ To support incremental compilation, tasks must ensure that the `TaskParameter` a
7272
</CreateProperty>
7373
```
7474

75-
This creates the property CompileRan and gives it the value `true`, but only if the target is executed. If the target is skipped, CompileRan is not created.
75+
This code creates the property CompileRan and gives it the value `true`, but only if the target is executed. If the target is skipped, CompileRan is not created.
7676

7777
## See also
7878
[Targets](../msbuild/msbuild-targets.md)

0 commit comments

Comments
 (0)