Search code examples
c#.netasp.net-mvc.net-coreaspnetboilerplate

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'.'


Solution

  • 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:

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

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