Skip to content

Add -bl placeholder docs and example #10951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/msbuild/msbuild-command-line-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Square brackets `[]` indicate optional parts, and curly braces `{}`indicate user

|Switch|Description|
|------------|-----------------|
|`-binaryLogger[:[LogFile=]{output.binlog}`<br/>`[;ProjectImports=None`,`Embed`,`ZipFile]]`<br/><br/>`-bl[:[LogFile=]{output.binlog}`<br/>`[;ProjectImports=None`,`Embed`,`ZipFile]]`|Serializes all build events to a compressed binary file. By default the file is in the current directory and named *msbuild.binlog*. The binary log is a detailed description of the build process that can later be used to reconstruct text logs and used by other analysis tools. A binary log is usually 10-20x smaller than the most detailed text diagnostic-level log, but it contains more information.<br /><br />The binary logger by default collects the source text of project files, including all imported projects and target files encountered during the build. The optional `ProjectImports` parameter controls this behavior:<br /><br /> - **ProjectImports=None**. Don't collect the project imports.<br /> - **ProjectImports=Embed**. Embed project imports in the log file (default).<br /> - **ProjectImports=ZipFile**. Save project files to *{output}.projectimports.zip* where \<output> is the same name as the binary log file name.<br /><br />The default setting for ProjectImports is Embed.<br />**Note**: the logger doesn't collect non-MSBuild source files such as `.cs`, `.cpp`, and so on.<br />A *.binlog* file can be "played back" by passing it to *msbuild.exe* as an argument instead of a project/solution. Other loggers receive the information contained in the log file as if the original build was happening. You can read more about the binary log and its usages at: https://github.com/dotnet/msbuild/blob/main/documentation/wiki/Binary-Log.md <br /><br />**Examples**:<br /> - `-bl`<br /> - `-bl:output.binlog`<br /> - `-bl:output.binlog;ProjectImports=None`<br /> - `-bl:output.binlog;ProjectImports=ZipFile`<br /> - `-bl:..\..\custom.binlog`<br /> - `-binaryLogger`|
|`-binaryLogger[:[LogFile=]{output.binlog}`<br/>`[;ProjectImports=None`,`Embed`,`ZipFile]]`<br/><br/>`-bl[:[LogFile=]{output.binlog}`<br/>`[;ProjectImports=None`,`Embed`,`ZipFile]]`|Serializes all build events to a compressed binary file. By default the file is in the current directory and named *msbuild.binlog*. The optional `LogFile` parameter accepts a string of the form `{filename}.binlog`, where `{filename}` contains valid file system characters, but also accepts a placeholder symbol `{}`. If `{}` is provided, MSBuild will fill that position with a 'unique stamp' of the form `yyyyMMdd-HHmmss--<current process id>--<6-character random string>`. The binary log is a detailed description of the build process that can later be used to reconstruct text logs and used by other analysis tools. A binary log is usually 10-20x smaller than the most detailed text diagnostic-level log, but it contains more information.<br /><br />The binary logger by default collects the source text of project files, including all imported projects and target files encountered during the build. The optional `ProjectImports` parameter controls this behavior:<br /><br /> - **ProjectImports=None**. Don't collect the project imports.<br /> - **ProjectImports=Embed**. Embed project imports in the log file (default).<br /> - **ProjectImports=ZipFile**. Save project files to *{output}.projectimports.zip* where \<output> is the same name as the binary log file name.<br /><br />The default setting for ProjectImports is Embed.<br />**Note**: the logger doesn't collect non-MSBuild source files such as `.cs`, `.cpp`, and so on.<br />A *.binlog* file can be "played back" by passing it to *msbuild.exe* as an argument instead of a project/solution. Other loggers receive the information contained in the log file as if the original build was happening. You can read more about the binary log and its usages at: https://github.com/dotnet/msbuild/blob/main/documentation/wiki/Binary-Log.md <br /><br />**Examples**:<br /> - `-bl`<br /> - `-bl:output.binlog`<br /> - `-bl:output.binlog;ProjectImports=None`<br /> - `-bl:output.binlog;ProjectImports=ZipFile`<br /> - `-bl:..\..\custom.binlog`<br /> - `-bl:publish-{}.binlog`<br /> - `-binaryLogger`|
|`-consoleLoggerParameters:{parameters}`<br/><br/>`-clp:{parameters}`|Pass the parameters that you specify to the console logger, which displays build information in the console window. You can specify the following parameters:<br /><br /> - **PerformanceSummary**. Show the time that's spent in tasks, targets, and projects.<br />- **Summary**. Show the error and warning summary at the end.<br />- **NoSummary**. Don't show the error and warning summary at the end.<br />- **ErrorsOnly**. Show only errors.<br />- **WarningsOnly**. Show only warnings.<br />- **NoItemAndPropertyList**. Don't show the list of items and properties that would appear at the start of each project build if the verbosity level is set to `diagnostic`.<br />- **ShowCommandLine**. Show `TaskCommandLineEvent` messages.<br />- **ShowProjectFile**. Show the path to the project file in diagnostic messages. This setting is on by default. <br />- **ShowTimestamp**. Show the timestamp as a prefix to any message.<br />- **ShowEventId**. Show the event ID for each started event, finished event, and message.<br />- **ForceNoAlign**. Don't align the text to the size of the console buffer.<br />- **DisableConsoleColor**. Use the default console colors for all logging messages.<br />- **DisableMPLogging**. Disable the multiprocessor logging style of output when running in non-multiprocessor mode.<br />- **EnableMPLogging**. Enable the multiprocessor logging style even when running in non-multiprocessor mode. This logging style is on by default.<br />- **ForceConsoleColor**. Use ANSI console colors even if console doesn't support it.<br />- **Verbosity**. Override the `-verbosity` setting for this logger.<br /><br /> Use a semicolon to separate multiple parameters, as the following example shows:<br /><br /> `-consoleLoggerParameters:PerformanceSummary;NoSummary -verbosity:minimal`<br/><br/> The default console logger is at normal verbosity and includes a `Summary`.|
|`-distributedFileLogger`<br/><br/>`-dfl`|Log the build output of each MSBuild node to its own file. The initial location for these files is the current directory. By default, the files are named *MSBuild\{NodeId}.log*. You can use the `-fileLoggerParameters` switch to specify the location of the files and other parameters for the fileLogger.<br /><br /> If you name a log file by using the `-fileLoggerParameters` switch, the distributed logger uses that name as a template and append the node ID to that name when creating a log file for each node.|
|`-distributedLogger:{central logger},{forwarding logger}, ...`<br/><br/>`-dl:{central logger},{forwarding logger, ...}`|Log events from MSBuild, attaching a different logger instance to each node. To specify multiple loggers, specify each logger separately.<br /><br /> You use the logger syntax to specify a logger, except you provide and additional class for the forwarding logger. For the logger syntax, see the `-logger` switch.<br /><br /> The following examples show how to use this switch:<br /><br /> `-dl:XMLLogger,MyLogger,Version=1.0.2,Culture=neutral`<br /><br /> `-dl:MyLogger,C:\My.dll*ForwardingLogger,C:\Logger.dll`|
Expand Down