Rune Jensen
Rune Jensen

Reputation: 761

Version conflict in .net core

I'am getting this error when trying to use Microsoft.Azure.Management.Fluent in my project.

Severity Code Project Description File Line Suppression State Error NU1607 ProjectX.Auth.Web Version conflict detected for Microsoft.IdentityModel.Clients.ActiveDirectory. Reference the package directly from the project to resolve this issue.

ProjectX.Auth.Web (>= 1.0.0) -> Microsoft.AspNetCore.All (>= 2.0.0) -> Microsoft.Extensions.Configuration.AzureKeyVault (>= 2.0.0) -> Microsoft.IdentityModel.Clients.ActiveDirectory (>= 3.14.1)

ProjectX.Auth.Web (>= 1.0.0) -> ProjectX.Auth.Infrastructure (>= 1.0.0) -> ProjectX.Shared.Infrastructure (>= 1.0.0) -> ProjectX.Shared.ServiceBus (>= 1.0.0) -> Microsoft.Azure.Management.Fluent (>= 1.2.0) -> Microsoft.Azure.Management.ResourceManager.Fluent (>= 1.2.0) -> Microsoft.Rest.ClientRuntime.Azure.Authentication (>= 2.3.1) -> Microsoft.IdentityModel.Clients.ActiveDirectory (>= 3.13.9).

Any idea how to solve this ?

Upvotes: 3

Views: 3211

Answers (2)

Rune Jensen
Rune Jensen

Reputation: 761

I used the method proposed in the question comments by @KirkLarkin and added the NuGet packages in the entire dependency chain.

Upvotes: 1

Sean Feldman
Sean Feldman

Reputation: 25994

You could add a binding redirect to redirect to the latest version of Microsoft.IdentityModel.Clients.ActiveDirectory (3.14.1).

Alternatively, you can also auto-generate binding redirects.

 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

 <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>

Upvotes: 1

Related Questions