Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用EF Core 1 RC2时出现异常:无法加载文件或程序集';系统.安全.密码.算法';_C#_Asp.net Core_Entity Framework Core - Fatal编程技术网

C# 使用EF Core 1 RC2时出现异常:无法加载文件或程序集';系统.安全.密码.算法';

C# 使用EF Core 1 RC2时出现异常:无法加载文件或程序集';系统.安全.密码.算法';,c#,asp.net-core,entity-framework-core,C#,Asp.net Core,Entity Framework Core,我有一个新的ASP.NET Core 1 RC2应用程序。(VisualStudio,IIS Express)。它在同一数据库中同时具有身份验证和数据(至少目前是这样): 对于System.Security.Cryptography.AlgorithmsNuget,我可以选择4.1.0-rc2和4.0.0-beta。两者都抛出相同的错误 从其他一些地方,我找到了安装System.Net.Security,Microsoft.NETCore.Platforms——但也没用 services.Add

我有一个新的ASP.NET Core 1 RC2应用程序。(VisualStudio,IIS Express)。它在同一数据库中同时具有身份验证和数据(至少目前是这样):

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

从其他一些地方,我找到了安装
System.Net.Security
Microsoft.NETCore.Platforms
——但也没用

services.AddDbContext<MyDbContext>(options =>
  options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
services.AddDbContext<ApplicationIdentityContext>(options =>
  options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
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)