Open matkoch opened 3 years ago
This is related to #46939
This seems to be working now. With both WarningsAsErrors and MSBuildWarningsAsErrors, the warning CS8785 is replaced by an error.
However, despite error in the output, the build runs successfully and is not aborted. This problem occurs with both WarningsAsErrors and MSBuildWarningsAsErrors. Normal warnings cause the build to fail as intended.
<WarningsAsErrors>CS8785</WarningsAsErrors>
doesn't have any effect for exceptions occurring in source generators. Instead, I have to useMSBuildWarningsAsErrors
.Discussed with @rainersigwald: