Skip to content

Commit

Permalink
Doc MSBUILDLOGALLENVIRONMENTVARIABLES (#9306)
Browse files Browse the repository at this point in the history
We generally don't expect people to need to set this, and it increases the likelihood of leaking secrets, but we should document it.

Co-authored-by: Sam Harwell <sam.harwell@microsoft.com>
  • Loading branch information
rainersigwald and sharwell authored Nov 1, 2023
1 parent 34ae4f3 commit 31c4d33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions documentation/wiki/Binary-Log.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Note that only `*.csproj`, `*.targets` and other MSBuild project formats are col

If the binary log contains the projects/imports files the MSBuild Structured Log Viewer will display all the files contained in the log, let you search through them and even display preprocessed view for any project where all imported projects are inlined (similar to `msbuild /pp` switch).

# Logging all environment variables

By default, MSBuild logs only the environment variables that are used to influence MSBuild, which is a subset of what is set in the environment. This reduces, but does not eliminate, the likelihood of leaking sensitive information through logs. This behavior can be changed to log the full environment by setting the environment variable `MSBUILDLOGALLENVIRONMENTVARIABLES=1`.

# Replaying a binary log

Instead of passing the project/solution to MSBuild.exe you can now pass a binary log to "build". This will replay all events to all other loggers (just the console by default). Here's an example of replaying a `.binlog` file to the diagnostic verbosity text log:
Expand Down

0 comments on commit 31c4d33

Please sign in to comment.