Post

Turn a warning into an error

That way you will receive a more strict warning that will look like an error.

<MSBuildTreatWarningsAsErrors>True</MSBuildTreatWarningsAsErrors>

JetBrain Rider displays Succeeded: False, however the compilation will be successful.

1
2
3
4
0>Program.cs(5,29): Error CS8625 : Cannot convert null literal to non-nullable reference type.
temp -> D:\Dmitry\EDX\_Test\temp\temp\bin\Debug\net8.0\temp.dll
0>------- Finished building project: temp. Succeeded: False. Errors: 1. Warnings: 0
Build completed in 00:00:01.378
This post is licensed under CC BY 4.0 by the author.