-
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
Cannot have keys other than those declared on the root type #5309
Comments
ilkertskn, The problem is not the command but the exception message that I get. If I comment out the "MyDatabase" models and mappers in the context, the command is creating the migration file.
For me the message is strange since the User is not part of the "MyDatabase" models and if that model is the cause of the error it should throw the same exception if "MyDatabase" models and mappers are not included. I think the problem is that some models have the same base class in Framework, and I read about not using the same property names in inheritance but the message it not saying that. |
Looks like a dupe of #3727 which was fixed in RC2. Can you retry on the RC2 release. Closing as we are pretty confident that this is resolved in RC2, please reply if not and we will reopen. |
I was not able to test RC2, the dependency" Microsoft.EntityFrameworkCore.SqlServer 1.0.0-rc2-final" and "Microsoft.EntityFrameworkCore.Tools 1.0.0-preview1-final" is not supported. I'm only using dnxcore50 as runtime. |
Yeah you would need to move your whole project to RC2, not just the EF parts. DNX is retired in favor of .NET Core in RC2. Here are the applicable docs: |
Rowan I'm not totally understanding the new .Net core, is it possible to give an example of a project.json file that is using EF rc2 en is not an mvc project but a class library. Just to give more context, |
Tools won't work in class library project see #5320 {
"version": "1.0.0-*",
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-24027",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final"
},
"frameworks": {
"netstandard1.3": {
"imports": ["portable-net451+win81"]
}
}
} |
All thanks for the answers, For the initial issue I found a work-a-round that is using rc1. |
I'm having these error when running:
dnx ef migrations add BT0001 -c "ApplicationContext" -p "BookerTools.Database.EF" -v
I can't find why I'm having this error,
I added the project that I'm using, Can someone tell me what I'm doing wrong or what that I forget to do.
Many thanks in advanced.
The text was updated successfully, but these errors were encountered: