-
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 when derived types have explicit FK property (doesn't happen if FK prop is created as shadow by convention) #3527
Comments
@MatthewMWR what is the build number of EF? |
Should be beta8 downloaded yesterday. Will confirm shortly. |
File properties on EntityFramework.SqlServer.dll shows: NuGet shows:
|
@MatthewMWR Possible fixed in #3478. Can you verify this bug still occurs with build >= 16047? (this will be an rc1 release). |
Sure. Is there a nightly build I can download or do I need to get set up to build locally? |
@MatthewMWR If you are unfamiliar with nightly builds, you should know there is some added instability of nightly builds due to rapid churn. Nightly builds can be by using this package feed: http://myget.org/gallery/aspnetvnext (Note there have been many renames of packages since beta8, including aspnet/Announcements#85) |
The latest prerelease I am seeing on MyGet is 7.0.0-rc1-15945. |
@natemcmaster looks like aspvnext has stalled, maybe better to point people to aspnetcidev ? |
@ErikEJ aspvnext intentionally lags (for testing) and is more stable than aspnetcidev. That said .... @MatthewMWR http://myget.org/gallery/aspnetcidev |
So far all attempts at installing from aspnetcidev fail with "Failed to add reference to 'System.Collections'." |
Forgive my ignorance for package management and fx versions... but it appears installing very recent EntityFramework.Core from http://myget.org/gallery/aspnetcidev is blocked because the EntityFramework.Core nupkg wants to add a project reference to System.Collections. At the same time it appears to be impossible to add such a reference (even manually) in a 4.5.x project because the vNext nuget packages for System.Collections don't appear to include a 4.5.x DLL. I imagine this means "use the framework version", but in 4.5.x there is no System.Collections assembly. The related classes appear to be implemented in mscorlib.dll. Maybe I am doing it wrong, or maybe this is a new bug. In any case I know you guys have a lot on your plate. If the NullReference bug looks important I'm eager to help repro so I'd appreciate help with this problem. If my original bug doesn't look important for what you are working on now I can wait. |
@MatthewMWR this particular bug investigation make take a while as we have some urgent deadlines upon us. Any help you can give us with this particular bug is much appreciated. Nightly builds are unstable and not always compatible with released version of VS tooling. Make sure you have the latest NuGet extension on use the dnx command line if/when that fails. |
Sure thing. I will update if I can get set up with >= 16047. |
@MatthewMWR - Since the latest codebase of EF has TPH scenario fully implemented, while trying to run above repro code, model uses TPH hence defining keys on derived types is not possible. |
By design (see previous comment from @smitpatel). Support for TPC is tracked by #3170 |
Exception:
Repro:
The text was updated successfully, but these errors were encountered: