-
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
NullReferenceException in Get-Migration in EF Core 8 #32487
Comments
This issue is lacking enough information for us to be able to fully understand what is happening. Please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate. |
We'll be working on the sample code trying to reproduce the problem over the next week. |
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it. BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions. |
We spent some time trying to work up a simpler test case and so far have been unsuccessful. |
File a bug
I'm upgrading a working solution from .NET 6 to .NET 8 / EF Core 6 to EF Core 8. It's a complex solution with separate projects for Models and Migrations and a startup project to use with the migrations.
When I run Get-Migration...
I get the following:
A colleague is trying to recreate the DbContext class to see where things go wrong. It appears from his testing that the problem is in SqlServerOnDeleteConventions.cs.
Include your code
I cloned some code from a Contoso University sample to try to reproduce the problem.
https://github.com/bgoodearl/ContosoU_dn8_EF
Unfortunately, the simpler solution works.
Include stack traces
Here's the sanitized verbose output of the complex project error with stack trace:
Include verbose output
Here's the output from the Contoso U sample that works:
Include provider and version information
EF Core version: 8.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 8.0
Operating system: Windows 10
IDE: Visual Studio 2022 17.8.1
The text was updated successfully, but these errors were encountered: