ASP.NET .NET Core 2 样板
ASP.NET Boilerplate .NET Core 2
正在尝试将 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://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/
- https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x
幸运的是,我升级了解决方案模板。所以,你可以看到我所做的所有更改:
https://github.com/aspnetboilerplate/module-zero-core-template/pull/106/files
正在尝试将 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://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/
- https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x
幸运的是,我升级了解决方案模板。所以,你可以看到我所做的所有更改:
https://github.com/aspnetboilerplate/module-zero-core-template/pull/106/files