dotnet / dotnet/sdk

Fully model the `--binaryLogger` MSBuild option in the CLI command parsers so that `watch` doesn't have to do custom handling

Open
#49,989 7 comments 2 reactions 1 assignee Assigned to @Copilot View on GitHub
Area-CLI untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

The list of options `command.Options.Where(o => o is IForwardedOption)` does not include `-bl` msbuild option, while it does include `--property` msbuild option:

Image

`dotnet watch` needs to forward this option to `dotnet build` instead of forwarding it to the application.

We should:
* check the documentation for MSBuild's [binlog option](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2022#switches-for-loggers)
* create a structure to hold the data encoded in the argument
* add a field to the MSBuildArgs struct for holding all MSBuild args
* Create a System.CommandLine option for the `-bl` arg and apply it to all Commands that forward to MSBuild today
* add the parsing of this field _via_ the new option to the MSBuildArgs parsing function
* make sure that the MSBuildForwardingApp forwards the '-bl' argument when calling _actual_ MSbuild.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.