[release/6.0] Force NullabilityInfoContextSupport=true in user projects#27916
Merged
roji merged 1 commit intodotnet:release/6.0from May 16, 2022
Merged
[release/6.0] Force NullabilityInfoContextSupport=true in user projects#27916roji merged 1 commit intodotnet:release/6.0from
roji merged 1 commit intodotnet:release/6.0from
Conversation
5a579a0 to
f2e2f59
Compare
eerhardt
reviewed
Apr 29, 2022
fb4c053 to
a86243e
Compare
To make NRT-based model building work correctly in aggressively trimmed applications (e.g. MAUI). Fixes dotnet#27474
a86243e to
e235600
Compare
Contributor
|
@roji has this been submitted to Tactics for inclusion in 6.0.6❔ |
Member
Author
|
@dougbu thanks for the reminder - you're right, this slipped through. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
MAUI's aggressive trimming of NRT-related attributes (dotnet/runtime#55860) doesn't allow users to use NRTs in EF Core models.
Customer impact
EF Core currently cannot be used with NRTs in MAUI. In 6.0, these attributes are silendly discarded (and an incorrect model is built); in EF Core, an exception is thrown (since NullabilityInfoContext is used).
How found
Reported by @eerhardt in #27474
Regression
No, MAUI hasn't yet been released.
Testing
Manual.
Risk
Very low - this simply adds a .props file to the EF Core nuget package.
Details
As suggested by @eerhardt, this adds a .props file to the EF Core main nuget package, which overrides the msbuild property to conserve the nullability attributes.
Fixes #27474