Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Boilerplate .NET Core 2

Trying to upgrade ASP.NET Boilerplate project from .NET Core 1.x to .NET Core 2.0

Solution builds successfully, but throws exception in Startup.ConfigureServices method at

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

Exception details

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

like image 622
tchelidze Avatar asked Mar 08 '23 06:03

tchelidze


1 Answers

You should wait ABP v3.0. We have released ABP v3.0.0-beta2. If you want, you can use beta version.

You also need to change your solution for:

  • https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/
  • https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x

Fortunately, I upgraded solution template. So, you can see all changes I done:

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

like image 132
hikalkan Avatar answered Mar 19 '23 05:03

hikalkan