使用EF Core 1 RC2的异常:无法加载文件或程序集'System.Security.Cryptography.Algorithms'

Fel*_*lix 5 c# entity-framework-core asp.net-core

我有一个新的ASP.NET Core 1 RC2应用程序.(Visual Studio,IIS Express).它在同一个数据库中具有身份验证和数据(至少目前为止):

services.AddDbContext<MyDbContext>(options =>
  options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
services.AddDbContext<ApplicationIdentityContext>(options =>
  options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
Run Code Online (Sandbox Code Playgroud)

我可以看到Identity部分工作(如果我"注册",则在AspNetUsers表中创建一条记录).但是,任何通过MyDbContext获取数据的尝试都会引发错误

An exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll and wasn't handled before a managed/native boundary

Additional information: Could not load file or assembly 'System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Run Code Online (Sandbox Code Playgroud)

对于System.Security.Cryptography.AlgorithmsNuget,我可以选择4.1.0-rc2和4.0.0-beta.两者都抛出相同的错误

从其他一些地方我发现了安装建议System.Net.Security,Microsoft.NETCore.Platforms但它也无济于事