Dragon4ik
Dragon4ik

Reputation: 83

NU1202: Package Microsoft.AspNetCore.Authentication.JwtBearer 5.0.2 is not compatible with netcoreapp3.1

everyone! I'm trying to add authorization to my app following this example: ASP.NET Core Web API v3.1: Authorization

Due to it I'm installing Microsoft.AspNetCore.Authentication.JwtBearer, but I get errors.

My VS IDE version is 16.8.4

Here is my App.csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Stripe.net" Version="39.32.0" />
  </ItemGroup>

</Project>

I can't understand, what should I do to solve this problem. Thank you for any advice!!!!

Upvotes: 0

Views: 2467

Answers (1)

Lukasz Szczygielek
Lukasz Szczygielek

Reputation: 3129

As you can see Microsoft.AspNetCore.Authentication.JwtBearer v5.0.2 works only with .NET 5. If you work with .NET Core 3.1 you should install lower version of this nuget which is Microsoft.AspNetCore.Authentication.JwtBearer v3.1.11.

Upvotes: 3

Related Questions