Three years ago (yes, I looked it up), I wrote a blog post about switching from warnings in NRT to errors. But it required manually adding codes for all the warnings (luckily thanks to Roslyn being open source, it’s not that difficult) and keeping that list up to date. But recently I found much simpler way.
Now, at least with C# 10 and VS 2022, you can simply use
<WarningsAsErrors>nullable</WarningsAsErrors> instead of
This is much easier to setup and maintain.