Skip to content

Commit 1715f56

Browse files
Merge pull request #12496 from ghogen/build-events-april-2024
Include link to MSBuild Exec task
2 parents 13e1243 + 5e5fff9 commit 1715f56

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/ide/how-to-specify-build-events-csharp.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ When you perform the previous steps, Visual Studio modifies your project file by
9090
</Target>
9191
```
9292

93+
The `Exec` element refers to the MSBuild `Exec` task. See [Exec task](../msbuild/exec-task.md) for information on what other parameters you can use to customize the execution. For example, you can use `WorkingDirectory` to set the folder from which the executable is run. The default is the directory that contains the project file.
94+
95+
```xml
96+
<Exec Command="call prebuild.bat" WorkingDirectory="$(OutDir)">
97+
```
98+
99+
You can use MSBuild properties (macros), such as `OutDir` in the previous example, as discussed later in this article at [Macros](#macros).
100+
93101
## Errors and other output
94102

95103
The output of your build events is written to the **Build** section of the **Output Window**. To open it, choose **View** > **Other Windows**, **Output Window**, or press **Ctrl**+**Alt**+**O**. In the dropdown next to **Show output from**, choose **Build**.

0 commit comments

Comments
 (0)