-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discussion] Changes to Nullable Reference Type Annotations in .NET 6.0 #27564
Comments
This is a bit of a tangent, but is there any intention to change the default for the .NET SDK in version 6 or further to enable nullable references for new projects, and have |
@slang25 ASP.NET Core is planning to do it as part of 6.0. #27389 has an overview of the planned work here. dotnet/sdk#14272 tracks doing it across other .NET 6 project templates. |
Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue. This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue! |
Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue. This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue! |
Changes to Nullable Reference Type Annotations in .NET 6.0
This issue represents a work-in-progress. All breaking changes to nullability annotations will be aggregated into this issue throughout the course of .NET 6.0.
Starting in .NET 5.0, we have been applying nullability annotations to parts of ASP.NET Core. From the outset of this effort, we anticipated that mistakes would be made in these annotations and fixes would need to be made. In .NET 6.0, we are updating some annotations that have been previously applied. Some of these changes are considered source breaking changes because it leads to the APIs being incompatible or more restrictive, or could result in build-time warnings when used in projects that have nullable reference types enabled.
Version introduced
.NET 6.0
Old behavior
The affected APIs had incorrect nullable reference type annotations and build warnings were either absent or incorrect.
New behavior
New build warnings will be produced and incorrect build warnings will no longer be produced for the affected APIs.
Reason for change
Through feedback and further testing, the nullable annotations for the affected APIs were determined to be inaccurate. The updated annotations now correctly represent the nullability contracts for the APIs.
Recommended action
Update code calling these APIs to reflect the revised nullability contracts.
Category
ASP.NET
Affected APIs
The text was updated successfully, but these errors were encountered: