When I create a new Console App (.NET Framework 4.8), and try to use C# 8's nullable reference types, I see the following:
And, I get this warning in my build output:
warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
Understandable, I haven't enabled nullable reference types yet. I add the following to my .csproj:
<Nullable>enable</Nullable>
This makes the build warning disappear, but Visual Studio's IntelliSense keeps complaining.
How can I configure Visual Studio so it understands I'm using nullable reference types in my .NET Framework project, without using #nullable
everywhere?
In contrast, if I create a new .NET Core 3.0 Console App, everything works as expected.