-
Notifications
You must be signed in to change notification settings - Fork 0
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
Try adding EF #1
Conversation
"version": "1.0.0-*", | ||
"imports": [ | ||
"dnxcore50", | ||
"portable-net45+win8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work if you do "portable-net452+win81"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Progress!
Now I get:
The project 'SquashNext' doesn't target a framework compatible with .NET Standard App 1.5. You must target a compatible framework such as 'netstandard1.3' in order to use the Entity Framework .NET Core CLI Commands.
It seems EF isn't aware of netcoreapp yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems EF isn't aware of netcoreapp yet?
Correct. Unless you're using a custom build, current versions of EF don't work on netcoreapp1.0 yet. Try changing your tfm to netstandard1.5 for now as a workaround.
@Pilchie as you know, dotnet-ef is still not 100% working. See dotnet/efcore#3925 and dotnet/efcore#4577. I have a working PR open for partial fixes dotnet/efcore#5002 |
@natemcmaster I pushed another commit, but now it fails to load Newtonsoft.Json again :-(
|
@Pilchie which version of dotnet-ef are you using? |
I have |
Does your project run? This newstonsoft.json error is coming from HelloMvc.Startup, not from within dotnet-ef. |
The master branch runs, I haven't tried it in this PR, because I will need to create the migration to get the DB running. Will experiment some more tonight. |
This branch also runs. I suspect the issue here is that when I run |
This may be due to how dotnet-ef loads user's projects. We're digging into this as a part of dotnet/efcore#4577 |
Great! Let me know if there are any workarounds as you dig in. |
Tag @davidfowl - Is it true that there is a separate graph for each tool, that is independent of the graph for the project itself? If so, that sounds like it will be problematic for tools like this that want to load project code, as they won't end up unifying on a version, and you'll run into problems like this where the app wants Json.NET v8, but the tool (EF in this case) already has Json.NET v7 loaded. |
Yes. This is part of the reason why dotnet-razor-tooling, dotnet-ef, and others will start requiring a node in "dependencies", not just tools. We started this move in dotnet/efcore#4977, but have discovered that even this separation isn't enough. Expect more changes before RC2 lands. |
Btw, I submitted a change for working with a project that uses json.net. This may take a while to run the CI, but the fix should temporarily unblock this. dotnet/efcore#5082 |
@Pilchie we finally pushed the changes to EF to fix a bunch of the bugs you were hitting. We renamed packages too. See dotnet/efcore#3925 (comment) for a sample project.json |
Thanks! I haven't had time to try much, but at least |
Attempt to add a simple EF db to the project with SqlLite.
Fails right now because
dotnet ef migrations list
fails to find Newtonsoft.Json.NET.