.NET Core 1.0 and EntityFramework 7 Compatibility Issues
As I originally asked over on StackOverflow in this posting, I've upgraded to Visual Studio Code 1.0.0 and I'm trying to retrofit an ASP.NET Core project I was working on in VSCode previously, before the new release. VSCode is seemingly quite different now in terms of configuration. I've worked with this tutorial and these samples. So far, the EntityFramework 7 aspect is a no-go.
When I do a dotnet restore on my project, I get the following errors:
Package Ix-Async 1.2.5 is not compatible with netcoreapp1.0
Package Remotion.Linq 2.0.2 is not compatible with netcoreapp1.0
I know those are related to the Microsoft.EntityFrameworkCore dependency because I ran a quick trial.
Here's my project.json. It's basically stock boilerplate from the samples mentioned above, with the exception of the newly-added Microsoft.EntityFrameworkCore dependency. Any help resolving this and getting back on the right track would be much appreciated, thank you.
{
"compilationOptions": {
"emitEntryPoint": true,
"debugType": "portable"
},
"dependencies": {
"Microsoft.AspNetCore.Mvc.Core": "1.0.0-*",
"Microsoft.AspNetCore.Mvc.Formatters.Json": "1.0.0-*",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
"Microsoft.EntityFrameworkCore": "1.0.0-*",
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-*"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"portable-net45+wp80+win8+wpa81+dnxcore50"
]
}
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-*",
"imports": "portable-net45+wp80+win8+wpa81+dnxcore50"
}
},
"scripts": {
"postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
}
}
@natemcmaster can you take a look at this one, guessing it is just a point in time thing where things are out of sync?
@robbpriestley I think the offender here is that "imports" only brings in "net45". We need "net451" at least. Try this:
"imports": [
"dnxcore50",
"portable-net452+win81"
],
Yep, that did it, thanks a bunch!
Say, I'm having a hard time understanding what the imports section actually does. Technically, I am building my application to run in Docker on Linux. I don't quite get why earlier versions of .NET and (seemingly?) Windows need to be referenced? This is probably the wrong place to ask, if not appropriate, I'd be happy to be referred elsewhere or to some docs?
Imports are document here: https://docs.nuget.org/consume/projectjson-format#imports. The primary reason for needing it is because Ix-Async and re-linq haven't yet produced libraries that are compiled to "netstandard". More docs are available here. http://dotnet.github.io/
If you want even more details, look in the "Documentation" folder in the source code for https://github.com/dotnet/corefx/tree/master/Documentation
Thanks very much
In november 2016 is it still true that Ix-Async has not yet produced libraries that are compiled to netstandard?
@wpostma the packages were renamed back in June. See https://www.dotnetfoundation.org/blog/rx-net-welcome. If you run into issues, the ix-async project is hosted at https://github.com/Reactive-Extensions/Rx.NET