Support compiler's ErrorLog better
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Summary
It's possible to pass `-pErrorLog=` to the compiler so that all warnings and errors are collected in a parseable sarif file. However, this is a feature of the compiler and MSBuild has not real understanding of it.
It would be nice if it could be toggled directly and if one could pass a folder to collect all output files (or even one file containing all errors from all projects in this solution).
### Background and Motivation
I'd like to automatically parse compiler warnings and show statistics on it. However, I usually build the full solution. With the current support, I can only switch the logs on, but they are created directly beside the `csproj` file. I'd rather have them in the `artifacts` folder, next to `bin` and `obj`.
### Proposed Feature
I'd like better support in `dotnet msbuild` (and `dotnet build`) for the compiler error log:
- Enabling it
- Using the artifact path if enabled
- specifying a different directory where all logs will be created
- specifying one file that will contain the build errors of all projects in this solution
### Alternative Designs
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.