You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2020. It is now read-only.
this generates without issues and is actually usable, but the following compiler warning is listed for the generated file. One warning per line that uses ? on a reference type.
Warning CS8669 The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.
What can/should we do about it? We'll definitely need to get aware of the Nullable project property. What else can we do to simplify/enable nullable generated code?
It was brought to my attention that generating code in NRT-enabled projects raises warnings.
Reference: amis92/RecordGenerator#110
From the issue linked above:
Looks like the dotnet team decided auto-generated code needs to explicitly opt-in into nullable reference types:
In a project with
this generates without issues and is actually usable, but the following compiler warning is listed for the generated file. One warning per line that uses
?on a reference type.What can/should we do about it? We'll definitely need to get aware of the Nullable project property. What else can we do to simplify/enable nullable generated code?