Skip to content

Commit 868eb69

Browse files
authored
Merge pull request #2493 from v-thepet/msbuild5
MSBuild #10
2 parents 87c2d27 + 6980401 commit 868eb69

10 files changed

+113
-101
lines changed

docs/msbuild/msbuild-api.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
# Using the MSBuild API
1+
---
2+
title: "MSBuild API | Microsoft Docs"
3+
ms.custom: ""
4+
ms.date: "11/04/2016"
5+
ms.technology: msbuild
6+
ms.topic: "conceptual"
7+
author: mikejo5000
8+
ms.author: mikejo
9+
manager: douge
10+
ms.workload:
11+
- "multiple"
12+
---
13+
# Use the MSBuild API
214

315
MSBuild provides a public API surface so that your program can perform builds and inspect projects.
416

docs/msbuild/msbuild-batching.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ manager: douge
1414
ms.workload:
1515
- "multiple"
1616
---
17-
# MSBuild Batching
17+
# MSBuild batching
1818
[!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] has the ability to divide item lists into different categories, or batches, based on item metadata, and run a target or task one time with each batch.
1919

20-
## Task Batching
20+
## Task batching
2121
Task batching allows you to simplify your project files by providing a way to divide item lists into different batches and pass each of those batches into a task separately. This means that a project file only needs to have the task and its attributes declared once, even though it can be run several times.
2222

23-
You specify that you want [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] to perform batching with a task by using the %(*ItemMetaDataName*) notation in one of the task attributes. The following example splits the `Example` item list into batches based on the `Color` item metadata value, and passes each of the batches to the `MyTask` task separately.
23+
You specify that you want [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] to perform batching with a task by using the %(\<ItemMetaDataName>) notation in one of the task attributes. The following example splits the `Example` item list into batches based on the `Color` item metadata value, and passes each of the batches to the `MyTask` task separately.
2424

2525
> [!NOTE]
26-
> If you do not reference the item list elsewhere in the task attributes, or the metadata name may be ambiguous, you can use the %(*ItemCollection.ItemMetaDataName*) notation to fully qualify the item metadata value to use for batching.
26+
> If you do not reference the item list elsewhere in the task attributes, or the metadata name may be ambiguous, you can use the %(\<ItemCollection.ItemMetaDataName>) notation to fully qualify the item metadata value to use for batching.
2727
2828
```xml
2929
<Project
@@ -47,12 +47,12 @@ ms.workload:
4747
</Project>
4848
```
4949

50-
For more specific batching examples, see [Item Metadata in Task Batching](../msbuild/item-metadata-in-task-batching.md).
50+
For more specific batching examples, see [Item metadata in task batching](../msbuild/item-metadata-in-task-batching.md).
5151

5252
## Target Batching
5353
[!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] checks if the inputs and outputs of a target are up-to-date before it runs the target. If both inputs and outputs are up-to-date, the target is skipped. If a task inside of a target uses batching, [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] needs to determine if the inputs and outputs for each batch of items is up-to-date. Otherwise, the target is executed every time it is hit.
5454

55-
The following example shows a `Target` element that contains an `Outputs` attribute with the %(*ItemMetaDataName*) notation. [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] will divide the `Example` item list into batches based on the `Color` item metadata, and analyze the timestamps of the output files for each batch. If the outputs from a batch are not up-to-date, the target is run. Otherwise, the target is skipped.
55+
The following example shows a `Target` element that contains an `Outputs` attribute with the %(\<ItemMetaDataName>) notation. [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] will divide the `Example` item list into batches based on the `Color` item metadata, and analyze the timestamps of the output files for each batch. If the outputs from a batch are not up-to-date, the target is run. Otherwise, the target is skipped.
5656

5757
```xml
5858
<Project
@@ -78,9 +78,9 @@ ms.workload:
7878
</Project>
7979
```
8080

81-
For another example of target batching, see [Item Metadata in Target Batching](../msbuild/item-metadata-in-target-batching.md).
81+
For another example of target batching, see [Item metadata in target batching](../msbuild/item-metadata-in-target-batching.md).
8282

83-
## Property Functions Using Metadata
83+
## Property functions using metadata
8484
Batching can be controlled by property functions that include metadata. For example,
8585

8686
`$([System.IO.Path]::Combine($(RootPath),%(Compile.Identity)))`
@@ -93,10 +93,10 @@ ms.workload:
9393

9494
is not allowed.
9595

96-
For more information about property functions, see [Property Functions](../msbuild/property-functions.md).
96+
For more information about property functions, see [Property functions](../msbuild/property-functions.md).
9797

98-
## See Also
99-
[ItemMetadata Element (MSBuild)](../msbuild/itemmetadata-element-msbuild.md)
100-
[MSBuild Concepts](../msbuild/msbuild-concepts.md)
101-
[MSBuild Reference](../msbuild/msbuild-reference.md)
102-
[Advanced Concepts](../msbuild/msbuild-advanced-concepts.md)
98+
## See also
99+
[ItemMetadata element (MSBuild)](../msbuild/itemmetadata-element-msbuild.md)
100+
[MSBuild concepts](../msbuild/msbuild-concepts.md)
101+
[MSBuild reference](../msbuild/msbuild-reference.md)
102+
[Advanced concepts](../msbuild/msbuild-advanced-concepts.md)

docs/msbuild/msbuild-best-practices.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ manager: douge
1414
ms.workload:
1515
- "multiple"
1616
---
17-
# MSBuild Best Practices
17+
# MSBuild best practices
1818
We recommend the following best practices for writing MSBuild scripts:
1919

2020
- Default property values are best handled by using the `Condition` attribute, and not by declaring a property whose default value can be overridden on the command line. For example, use
@@ -27,5 +27,5 @@ We recommend the following best practices for writing MSBuild scripts:
2727

2828
- Avoid wildcards when you select items. Instead, specify files explicitly. This makes it easier to track down errors that may occur when you add or delete files.
2929

30-
## See Also
31-
[Advanced Concepts](../msbuild/msbuild-advanced-concepts.md)
30+
## See also
31+
[Advanced concepts](../msbuild/msbuild-advanced-concepts.md)

0 commit comments

Comments
 (0)