aspnet / LibraryManager

MIT License
457 stars 83 forks source link

Lowering importance of informational messages from `RestoreTask` #707

Closed alexrp closed 7 months ago

alexrp commented 1 year ago

Is your feature request related to a problem? Please describe.

The MSBuild task is unnecessarily chatty when there are no issues:

$ dotnet build --no-restore -m:1
MSBuild version 17.4.0+18d5aef85 for .NET
  ... snip ...
  generators -> C:\Users\alex\source\repos\test\src\generators\bin\Debug\generators.dll

  Restore operation started

  3 libraries restored in 0,11 seconds

  server -> C:\Users\alex\source\repos\test\src\server\bin\Debug\win-x64\server.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:02.86

I'm a big believer in the idea that, by default, build systems should be as silent as possible when everything is proceeding smoothly. In line with that thinking, I'd prefer not to see messages from LibMan unless something actually went wrong. If I want more detailed output, I can always pass -v:n (or higher).

Describe the solution you'd like

I'd like for there to be an MSBuild property (e.g. LibraryManagerMessageImportance=low) that gets passed to RestoreTask and used as the message importance for informational messages, or something to that effect.

Describe alternatives you've considered

Not aware of any.