c# - ASP.NET 样板 .NET Core 2

标签 c# .net asp.net-mvc .net-core aspnetboilerplate

正在尝试将 ASP.NET Boilerplate 项目从 .NET Core 1.x 升级到 .NET Core 2.0

解决方案构建成功,但在 Startup.ConfigureServices 方法中抛出异常

 services.AddAbpIdentity<Tenant, User, Role, SecurityStampValidator>(
     options => {})
   .AddUserManager<UserManager>()
   .AddRoleManager<RoleManager>()
   .AddSignInManager<SignInManager>()
   .AddClaimsPrincipalFactory<UserClaimsPrincipalFactory>()
   .AddDefaultTokenProviders();

异常详情

System.TypeLoadException: 'Could not load type 'Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions' from assembly 'Microsoft.AspNetCore.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.'

最佳答案

您应该等待 ABP v3.0。我们已经发布了 ABP v3.0.0-beta2。如果需要,您可以使用测试版。

您还需要更改您的解决方案:

幸运的是,我升级了解决方案模板。因此,您可以看到我所做的所有更改:

https://github.com/aspnetboilerplate/module-zero-core-template/pull/106/files

关于c# - ASP.NET 样板 .NET Core 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45819037/

相关文章:

.net - 如何判断定时器是否正在运行?

asp.net-mvc - site.css 不适用于我的示例网站

asp.net - 在 ASP.NET MVC View 中渲染 HTML 文件?

c# - 什么是锁定线程的正确方法?

c# - 使用 Linq 和 Guid 的匿名类型

c# - 从字符串中的特定字符创建数组

c# - List<String> 到 List<Object> C#

c# - 使用 Include() 时 Entity Framework 不急于加载

.net - 将 Access 文件读取到数据集中

c# - "Cannot insert the value NULL into column "但我的专栏是 Nullable ... Entity Framework 5 asp.net MVC