Tried to use the Entityframework in a .netCore console application with project.json
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.EntityFrameworkCore": "1.0.0-rc2-final",
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002702"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Unfortunately these packages do not work together:
NU1002 The dependency Remotion.Linq 2.0.2 does not support framework .NETCoreApp,Version=v1.0.
NU1002 The dependency Ix-Async 1.2.5 does not support framework .NETCoreApp,Version=v1.0.
Does someone know how to use the entity framework in .net Core console applications?
Microsoft.EntityFrameworkCore
in version 1.0.0-rc2-final
uses Remotion.Linq 2.0.2
which (in that version) does not support the netstandard/netcoreapp
target framework monikers yet. However it supports the portable class library combination portable-net45+win+wpa81+wp80
which can be imported using the imports
statement in the above project.json. The same is true for the deprecated Ix-Async
and the portable class library portable-windows8+net45+wp8
. Read the rc2 samples of entity framework carefully, they surely import a portable class library target framework moniker.
However, I highly recommend to upgrade to the current .NET Core version (RTM). .NET Core and Entity Framework Core in the above versions are all release candidates and not the final version. RC2 had a go-live license but that will expire (IMHO) like 3 months after the next go-live or final release. Further, Remotion.Linq
supports the netstandard
then and the Ix-Async
was repackaged as System.Interactive.Async
and also supports netstandard
. Therefore, your problem would vanish.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.