The annotation for nullable reference types should only be used in code within a ‘#nullable’ context
For anyone ending up here. You can put #nullable enable on top of the file for a file-by-file approach as suggested by @Marc in the comments. You can also use combinations of #nullable enable/disable to annotate just parts of the file class Program { static void Main(string[] args) { #nullable enable string? message = “Hello … Read more