-
Notifications
You must be signed in to change notification settings - Fork 3.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
Enable nullability in migrations and model snapshots #18950
Comments
@TorreyGarland Putting this in the backlog to consider in the future. The global suppression seems like the best workaround for now. |
@ajcvickers @TorreyGarland Could either of you provide an example of such a global supression? I'm trying to get them to work, but with no success.
I did read somewhere that the |
I think that by global suppression, it was meant that you don't activate the NRT feature at the project level (i.e. Another option is to place a |
Clearing milestone to discuss if we want to do something for 6.0. |
@roji I'm pretty sure global suppressions is generally the term for what I mentioned above, so I assume that's what @TorreyGarland meant. I can't see why it's not working, though. Disabling nullable for the entire project is too impactful, unfortunately. Adding I'm still hoping for a solution that makes the problem go away, instead of requiring each developer to remember for each new migration. We have "treat warnings as errors" enabled in the DevOps pipeline, to prevent the solution from becoming riddled with warnings... so it's quite a nuisance. 😛 |
You're right - global suppressions should indeed also work, I'm not sure why the above doesn't. I also agree we should provide a better solution than requiring developers to handle this themselves every time. |
@roji How about adding |
Yeah, that's what we did for scaffolding before 6.0. We should consider doing this (both for migrations and for the model snapshot). |
Opened #25624 to track adding |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Scenarios:
|
I am generating migrations files for EF core with the new nullable reference types analysis turned on for an ASP.NET core app (3.0).
The migration file generated has several "new object[]" declarations that VS is flagging for CS8625 warnings (screenshot included).
Is there a work-around or change coming so that we don't have to do a global suppression. I want the nullable reference analysis, but just not for these migration files.
The text was updated successfully, but these errors were encountered: