EntityFramework.Core添加到net4.6和通用的Windows类库工作,添加到目标的可移植类库都没有

时间:2016-03-17 14:05:42

标签: c# .net entity-framework nuget

我希望将EntityFramework.Core NuGet数据包(目前版本为7.0.0-rc1-final)的引用添加到可移植类库,同时针对.NET Framework 4.6和Windows Universal 10.0。但是,我得到以下输出:

Restoring packages for 'ClassLibrary1'.
Restoring packages for C:\*snip*\project.json...
EntityFramework.Core 7.0.0-rc1-final is not compatible with .NETPlatform,Version=v5.0.
Some packages are not compatible with .NETPlatform,Version=v5.0.
All packages are compatible with .NETFramework,Version=v4.6.
All packages are compatible with UAP,Version=v10.0.
All packages are compatible with .NETFramework,Version=v4.6 (win-x86).
All packages are compatible with .NETFramework,Version=v4.6 (win-x64).
All packages are compatible with UAP,Version=v10.0 (win10-x86).
All packages are compatible with UAP,Version=v10.0 (win10-x86-aot).
All packages are compatible with UAP,Version=v10.0 (win10-x64).
All packages are compatible with UAP,Version=v10.0 (win10-x64-aot).
All packages are compatible with UAP,Version=v10.0 (win10-arm).
All packages are compatible with UAP,Version=v10.0 (win10-arm-aot).
Package restore failed for 'ClassLibrary1'.
Package restore failed. Rolling back package changes for 'ClassLibrary1'.
========== Finished ==========

我不知道.Net v5.0引用的含义及其来源。更奇怪的是,完全可以将EFcore数据包添加到仅针对通用窗口或.Net framework v4.6的类库中:

as shown, you can add the packet to individual libraries but not to a portable library

如图所示,您可以将数据包添加到单个库,但不能添加到可移植库。这是为什么?

0 个答案:

没有答案