Azure-sdk-for-net: Upgrade Microsoft.Rest.ClientRuntime.Azure.Authentication to >= 3.14.1

Created on 16 Oct 2017  路  13Comments  路  Source: Azure/azure-sdk-for-net

Can't reference Azure SDK in ASP.NET Core 2.0 projects because of version conflict:

Steps to repro:

  1. File -> New -> ASP.NET Core 2.0 MVC site
  2. Manage NuGet Packages
  3. Add Microsoft.Azure.Management.ResourceManager.Fluent 1.3.0

Actual behavior: Receive error

Version conflict detected for Microsoft.IdentityModel.Clients.ActiveDirectory. Reference the package directly from the project to resolve this issue. 
Web -> Microsoft.AspNetCore.All 2.0.0 -> Microsoft.Extensions.Configuration.AzureKeyVault 2.0.0 -> Microsoft.IdentityModel.Clients.ActiveDirectory (>= 3.14.1) 
Web -> Microsoft.Azure.Management.Fluent 1.3.0 -> Microsoft.Azure.Management.ResourceManager.Fluent 1.3.0 -> Microsoft.Rest.ClientRuntime.Azure.Authentication 2.3.1 -> Microsoft.IdentityModel.Clients.ActiveDirectory (= 3.13.9)

Expected behavior: Package would install

Most helpful comment

Any updates on this? Seems like pretty small effort for large gain to just allow [3.13.9, 4.0) so .NET Core 2.0 users can use this package. This is preventing us from using in our project as well.

All 13 comments

@robrich did you try redirecting assembly version?

I have tried binding redirects using the technique from http://blog.rytmis.net/2016/03/29/asp-net-core-and-assembly-binding-redirects/ but package restore still fails.

If you manually install the package 'Microsoft.IdentityModel.Clients.ActiveDirectory' version 3.17.0 you will get the following error:

Detected package version outside of dependency constraint: Microsoft.Rest.ClientRuntime.Azure.Authentication 2.3.1 requires Microsoft.IdentityModel.Clients.ActiveDirectory (= 3.13.9) but version Microsoft.IdentityModel.Clients.ActiveDirectory 3.17.0 was resolved.
Version conflict detected for Microsoft.IdentityModel.Tokens. Reference the package directly from the project to resolve this issue. 
 WebApplication3 -> Microsoft.AspNetCore.All 2.0.0 -> Microsoft.AspNetCore.Authentication.OpenIdConnect 2.0.0 -> Microsoft.IdentityModel.Protocols.OpenIdConnect 2.1.4 -> Microsoft.IdentityModel.Protocols 2.1.4 -> System.IdentityModel.Tokens.Jwt 5.1.4 -> Microsoft.IdentityModel.Tokens (>= 5.1.4) 
 WebApplication3 -> Microsoft.Azure.Management.Fluent 1.3.0 -> Microsoft.Azure.Management.ResourceManager.Fluent 1.3.0 -> Microsoft.Rest.ClientRuntime.Azure.Authentication 2.3.1 -> Microsoft.IdentityModel.Tokens (= 5.1.2).

I am currently trying to test if, adding the NuGet package to an external class library and add the reference to this library in the main ASP.NET Core 2.0 project would work.
[EDIT] Doesn't work either...

When is this update planned? I just went through a lot of work recently to upgrade ADAL in our product (.Net 4.6) from 2.x to 3.x, only to realize, i'm held back by the hard dependency here.
Are there any pre-release branches atleast that have this?

@brijeshb Hey, in the meantime, you can use the fork I've created https://github.com/FabienLavocat/azure-sdk-for-net

I have this same issue trying to incorporate the rest authentication for data lake with the active directory library in .net core 2.0

I have the same issue trying to get Data Lake Store functionality to work:

Error Unable to resolve dependencies. 'Microsoft.IdentityModel.Clients.ActiveDirectory 3.17.2' > is not compatible with 'Microsoft.Rest.ClientRuntime.Azure.Authentication 2.3.1 constraint:
Microsoft.IdentityModel.Clients.ActiveDirectory (= 2.28.3)'. 0

Can this package at least be revised to reference >= 3.13.9 instead of = 3.13.9? This hard constraint on a minor version makes it impossible fo it to coexist with Microsoft.AspNetCore.All, which requires >= 3.14.1

I hit the issue when tried to use Microsoft.Azure.Services.AppAuthentication (https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication/1.1.0-preview), please move to 3.x.x.

Any updates on this? Seems like pretty small effort for large gain to just allow [3.13.9, 4.0) so .NET Core 2.0 users can use this package. This is preventing us from using in our project as well.

There seems to be another case of this package using a specific version that should be ranged as well.

Web -> Microsoft.AspNetCore.Authentication.OpenIdConnect 2.0.1 -> Microsoft.IdentityModel.Protocols.OpenIdConnect 2.1.4 -> Microsoft.IdentityModel.Protocols 2.1.4 -> System.IdentityModel.Tokens.Jwt 5.1.4 -> Microsoft.IdentityModel.Tokens (>= 5.1.4)

Web -> Microsoft.Azure.Management.Fluent 1.4.1 -> Microsoft.Azure.Management.ResourceManager.Fluent 1.4.1 -> Microsoft.Rest.ClientRuntime.Azure.Authentication 2.3.1 -> Microsoft.IdentityModel.Tokens (= 5.1.2).

Can it be updated to [5.1.2, 6)?

The workaround for now would be - please add dependency to Microsoft.Rest.ClientRuntime.Azure.Authentication v.2.3.2 in your project,

This issue is fixed in Fluent v1.6. In case of failures in Fluent SDK please create a new issue in https://github.com/Azure/azure-libraries-for-net/issues repo.

Was this page helpful?
0 / 5 - 0 ratings