Skip to content

Commit efff5f6

Browse files
committed
acrolinx, correx
1 parent a67cf63 commit efff5f6

5 files changed

+18
-17
lines changed

docs/msbuild/how-to-build-specific-targets-in-solutions-by-using-msbuild-exe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You can use *MSBuild.exe* to build specific targets of specific projects in a so
2222

2323
1. At the command line, type `MSBuild.exe <SolutionName>.sln`, where `<SolutionName>` corresponds to the file name of the solution that contains the target that you want to execute.
2424

25-
2. Specify the target after the `/target:` switch in the format `<ProjectName>:<TargetName>`. If the project name contains any of the characters `%`, `$`, `@`, `;`, `.`, `(`, `)`, or `'`, replace them with an `_` in the specified target name.
25+
2. Specify the target after the `/target:` switch in the format \<ProjectName>:\<TargetName>. If the project name contains any of the characters `%`, `$`, `@`, `;`, `.`, `(`, `)`, or `'`, replace them with an `_` in the specified target name.
2626

2727
## Example
2828
The following example executes the `Rebuild` target of the `NotInSlnFolder` project, and then executes the `Clean` target of the `InSolutionFolder` project, which is located in the *NewFolder* solution folder.

docs/msbuild/how-to-clean-a-build.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ When you clean a build, all intermediate and output files are deleted, leaving o
3030

3131
2. Use the [MakeDir](../msbuild/makedir-task.md) task to create the directory if the directory does not exist. For example:
3232

33-
`<MakeDir Directories = "$(builtdir)"`
34-
35-
`Condition = "!Exists('$(builtdir)')" />`
33+
```xml
34+
<MakeDir Directories = "$(builtdir)"
35+
Condition = "!Exists('$(builtdir)')" />
36+
```
3637

3738
## Remove the output items
3839
Prior to creating new instances of intermediate and output files, you may want to clear all previous instances of intermediate and output files. Use the [RemoveDir](../msbuild/removedir-task.md) task to delete a directory and all files and directories that it contains from a disk.

docs/msbuild/how-to-escape-special-characters-in-msbuild.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ Certain characters have special meaning in [!INCLUDE[vstecmsbuild](../extensibil
4040

4141
## See also
4242
[MSBuild concepts](../msbuild/msbuild-concepts.md)
43-
[MSBuild](../msbuild/msbuild.md)
44-
[Items](../msbuild/msbuild-items.md)
43+
[MSBuild](../msbuild/msbuild.md)
44+
[Items](../msbuild/msbuild-items.md)

docs/msbuild/how-to-exclude-files-from-the-build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,5 @@ In a project file you can use wildcards to include all the files in one director
120120
121121
## See also
122122
[Items](../msbuild/msbuild-items.md)
123-
[MSBuild](../msbuild/msbuild.md)
124-
[How to: Select the files to build](../msbuild/how-to-select-the-files-to-build.md)
123+
[MSBuild](../msbuild/msbuild.md)
124+
[How to: Select the files to build](../msbuild/how-to-select-the-files-to-build.md)

docs/msbuild/how-to-extend-the-visual-studio-build-process.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ ms.workload:
1717
- "multiple"
1818
---
1919
# How to: Extend the Visual Studio build process
20-
The [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] build process is defined by a series of [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] *.targets* files that are imported into your project file. One of these imported files, *Microsoft.Common.targets*, can be extended to allow you to run custom tasks at several points in the build process. This topic explains two methods you can use to extend the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] build process:
20+
The [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] build process is defined by a series of [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] *.targets* files that are imported into your project file. One of these imported files, *Microsoft.Common.targets*, can be extended to allow you to run custom tasks at several points in the build process. This article explains two methods you can use to extend the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] build process:
2121

2222
- Overriding specific predefined targets defined in *Microsoft.Common.targets*.
2323

2424
- Overriding the "DependsOn" properties defined in *Microsoft.Common.targets*.
2525

2626
## Override predefined targets
27-
The *Microsoft.Common.targets* file contains a set of predefined empty targets that are called before and after some of the major targets in the build process. For example, [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] calls the `BeforeBuild` target before the main `CoreBuild` target and the `AfterBuild` target after the `CoreBuild` target. By default, the empty targets in *Microsoft.Common.targets* do nothing, but you can override their default behavior by defining the targets you want in a project file that imports *Microsoft.Common.targets*. By doing this, you can use [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] tasks to give you more control over the build process.
27+
The *Microsoft.Common.targets* file contains a set of predefined empty targets that is called before and after some of the major targets in the build process. For example, [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] calls the `BeforeBuild` target before the main `CoreBuild` target and the `AfterBuild` target after the `CoreBuild` target. By default, the empty targets in *Microsoft.Common.targets* do nothing, but you can override their default behavior by defining the targets you want in a project file that imports *Microsoft.Common.targets*. By overriding the predefined targets, you can use [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] tasks to give you more control over the build process.
2828

2929
#### To override a predefined target
3030

@@ -45,18 +45,18 @@ The [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] build process is d
4545
```
4646

4747
3. Build the project file.
48-
49-
The following table shows all of the targets in *Microsoft.Common.targets* that you can safely override.
48+
49+
The following table shows all of the targets in *Microsoft.Common.targets* that you can safely override.
5050

5151
|Target name|Description|
5252
|-----------------|-----------------|
5353
|`BeforeCompile`, `AfterCompile`|Tasks inserted in one of these targets run before or after core compilation is done. Most customizations are done in one of these two targets.|
54-
|`BeforeBuild`, `AfterBuild`|Tasks inserted in one of these targets will run before or after everything else in the build. **Note:** The `BeforeBuild` and `AfterBuild` targets are already defined in comments at the end of most project files. This allows you to easily add pre- and post-build events to your project file.|
54+
|`BeforeBuild`, `AfterBuild`|Tasks inserted in one of these targets will run before or after everything else in the build. **Note:** The `BeforeBuild` and `AfterBuild` targets are already defined in comments at the end of most project files, allowing you to easily add pre- and post-build events to your project file.|
5555
|`BeforeRebuild`, `AfterRebuild`|Tasks inserted in one of these targets run before or after the core rebuild functionality is invoked. The order of target execution in *Microsoft.Common.targets* is: `BeforeRebuild`, `Clean`, `Build`, and then `AfterRebuild`.|
56-
|`BeforeClean`, `AfterClean`|Tasks inserted in one of these targets run before or after the core clean functionality is invoked.|
57-
|`BeforePublish`, `AfterPublish`|Tasks inserted in one of these targets run before or after the core publish functionality is invoked.|
58-
|`BeforeResolveReference`, `AfterResolveReferences`|Tasks inserted in one of these targets run before or after assembly references are resolved.|
59-
|`BeforeResGen`, `AfterResGen`|Tasks inserted in one of these targets run before or after resources are generated.|
56+
|`BeforeClean`, `AfterClean`|Tasks that are inserted in one of these targets run before or after the core clean functionality is invoked.|
57+
|`BeforePublish`, `AfterPublish`|Tasks that are inserted in one of these targets run before or after the core publish functionality is invoked.|
58+
|`BeforeResolveReference`, `AfterResolveReferences`|Tasks that are inserted in one of these targets run before or after assembly references are resolved.|
59+
|`BeforeResGen`, `AfterResGen`|Tasks that are inserted in one of these targets run before or after resources are generated.|
6060

6161
## Override "DependsOn" properties
6262
Overriding predefined targets is an easy way to extend the build process, but, because [!INCLUDE[vstecmsbuild](../extensibility/internals/includes/vstecmsbuild_md.md)] evaluates the definition of targets sequentially, there is no way to prevent another project that imports your project from overriding the targets you already have overridden. So, for example, the last `AfterBuild` target defined in the project file, after all other projects have been imported, will be the one that is used during the build.

0 commit comments

Comments
 (0)