Search code examples
.netvisual-studioidentitymodel

Is it possible to reference IdentityModel library in a project .Net framework 4.5?


When I try to install the nuget package for IdentityModel for my .NET Framework 4.5 console application, I get the error:

Could not install package 'IdentityModel 3.10.10'. You are trying to install
this package into a project that targets '.NETFramework,Version=v4.5', but the
package does not contain any assembly references or content files that are
compatible with that framework. For more information, contact the package author.

But it does work in my ASP.NET Web Application, which targets .NET Core 2.1.

Is it possible to use this library in a console application, or am I forced to use a web application?


Solution

  • IdentityModel requires minimum .NETFramework 4.5.2 or NetStandard 2.0

    https://www.nuget.org/packages/identitymodel/

    Please see below https://learn.microsoft.com/en-us/dotnet/standard/net-standard