Skip to content

Commit e7e098c

Browse files
committed
Document --bl parameter for dotnet build
Fixes #50115
1 parent 509e893 commit e7e098c

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/core/tools/dotnet-build.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ dotnet build [<PROJECT>|<SOLUTION>|<FILE>] [-a|--arch <ARCHITECTURE>]
2323
[-p|--property:<PROPERTYNAME>=<VALUE>] [-r|--runtime <RUNTIME_IDENTIFIER>]
2424
[--sc|--self-contained] [--source <SOURCE>]
2525
[--tl:[auto|on|off]] [ --ucr|--use-current-runtime]
26-
[-v|--verbosity <LEVEL>] [--version-suffix <VERSION_SUFFIX>]
26+
[-v|--verbosity <LEVEL>] [--bl[:<FILE>]] [--version-suffix <VERSION_SUFFIX>]
27+
2728
2829
dotnet build -h|--help
2930
```
@@ -148,6 +149,19 @@ Running `dotnet build` is equivalent to running `dotnet msbuild -restore`; howev
148149

149150
- [!INCLUDE [verbosity](../../../includes/cli-verbosity.md)]
150151

152+
- **`--bl[:<FILE>]`**
153+
154+
Enables the binary logger and optionally specifies the output file name.
155+
If no file name is provided, the default is `msbuild.binlog` in the current directory.
156+
157+
The binary log contains detailed build information and can be opened with the
158+
[MSBuild Structured Log Viewer](https://msbuildlog.com).
159+
160+
```dotnetcli
161+
dotnet build --bl
162+
dotnet build --bl:build-log.binlog
163+
```
164+
151165
- **`--version-suffix <VERSION_SUFFIX>`**
152166

153167
Sets the value of the `$(VersionSuffix)` property to use when building the project. This only works if the `$(Version)` property isn't set. Then, `$(Version)` is set to the `$(VersionPrefix)` combined with the `$(VersionSuffix)`, separated by a dash.
@@ -193,3 +207,9 @@ Running `dotnet build` is equivalent to running `dotnet msbuild -restore`; howev
193207
```dotnetcli
194208
dotnet build -p:Version=1.2.3.4
195209
```
210+
211+
- Build a project and its dependencies:
212+
213+
```dotnetcli
214+
dotnet build
215+
```

0 commit comments

Comments
 (0)