[英]EntityFramework in Microsoft.NETCore.App
Tried to use the Entityframework in a .netCore console application with project.json
试图用的EntityFramework与.netCore控制台应用程序
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依赖项Remotion.Linq 2.0.2不支持框架.NETCoreApp,Version = v1.0。
NU1002 The dependency Ix-Async 1.2.5 does not support framework .NETCoreApp,Version=v1.0.
NU1002依赖关系Ix-Async 1.2.5不支持框架.NETCoreApp,Version = v1.0。
Does someone know how to use the entity framework in .net Core console applications? 有人知道如何在.net Core控制台应用程序中使用实体框架吗?
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. 1.0.0-rc2-final
版本中的Microsoft.EntityFrameworkCore
使用Remotion.Linq 2.0.2
,该版本(在该版本中)尚不支持netstandard/netcoreapp
目标框架netstandard/netcoreapp
。 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. 但是,它支持可移植类库组合
portable-net45+win+wpa81+wp80
,可以使用上述project.json中的imports
语句将其imports
。 The same is true for the deprecated Ix-Async
and the portable class library portable-windows8+net45+wp8
. 对于已弃用的
Ix-Async
和可移植类库portable-windows8+net45+wp8
。 Read the rc2 samples of entity framework carefully, they surely import a portable class library target framework moniker. 仔细阅读实体框架的rc2示例,他们肯定会导入可移植类库目标框架的绰号。
However, I highly recommend to upgrade to the current .NET Core version (RTM). 但是, 我强烈建议升级到当前的.NET Core版本(RTM)。 .NET Core and Entity Framework Core in the above versions are all release candidates and not the final version.
上述版本中的.NET Core和Entity Framework Core都是发行候选版本,而不是最终版本。 RC2 had a go-live license but that will expire (IMHO) like 3 months after the next go-live or final release.
RC2拥有上线许可证,但将在下一个上线或最终版本发布3个月后过期(IMHO)。 Further,
Remotion.Linq
supports the netstandard
then and the Ix-Async
was repackaged as System.Interactive.Async
and also supports netstandard
. 此外,
Remotion.Linq
然后支持netstandard
,并且Ix-Async
被重新打包为System.Interactive.Async
,还支持netstandard
。 Therefore, your problem would vanish. 因此,您的问题将消失。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.