当我尝试为.NET Framework 4.5控制台应用程序安装IdentityModel的nuget软件包时,出现错误:
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.
但是它确实可以在我的ASP.NET Web应用程序中工作,该应用程序针对.NET Core 2.1。
是否可以在控制台应用程序中使用此库,还是我被迫使用Web应用程序?
答案 0 :(得分:2)
IdentityModel至少需要.NETFramework 4.5.2或NetStandard 2.0
https://www.nuget.org/packages/identitymodel/
请参阅下文 https://docs.microsoft.com/en-us/dotnet/standard/net-standard