Reputation: 10443
Trying to install the OpenIDConnect Nuget package to my project, which was targeting .NET Framework 4.5
. That failed, with the error:
Could not install package '
Microsoft.AspNet.Authentication.OpenIdConnect 1.0.0-rc1-final
'. 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.
So I look at the dependencies for the package, and see that "DNX 4.5.1" is listed:
Dependencies
DNX 4.5.1
Microsoft.AspNet.Authentication (>= 1.0.0-rc1-final) Microsoft.IdentityModel.Protocols.OpenIdConnect (>= 2.0.0-rc1-211161024)
DNXCore 5.0
Microsoft.AspNet.Authentication (>= 1.0.0-rc1-final) Microsoft.IdentityModel.Protocols.OpenIdConnect (>= 2.0.0-rc1-211161024)
System.Net.Http (>= 4.0.1-beta-23516)
... so I assumed that DNX
is a useless abbreviation of ".NET" - who knows, maybe the field doesn't accept a '.' in the field, so they had to come up with something else. No worries, I'll just upgrade my project to .NET Framework 4.5.1
and try again.
... but that didn't work. I get the same error, but the error has the 4.5.1 version number.
I looked at the "install other frameworks" page and I don't see any "DNX" frameworks listed there.
Upvotes: 0
Views: 1889
Reputation: 76740
How do I Install OpenIDConnect Nuget Package with Dependency on “DNX 4.5.1”
Just like Will said, this nuget package came out during the birth of .NET Core and you can also find this this nuget package is a just a pre-release version, microsoft has not officially released it. It has not been updated since 11/18/2015. Obviously,The NuGet team deprecated this package.
To resolve this issue, you can use the package Microsoft.AspNetCore.Authentication.OpenIdConnect
instead of it.
Get it from: https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.OpenIdConnect/2.1.0-preview1-final
Hope this helps.
Upvotes: 1