Reputation: 83
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
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