简体   繁体   中英

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 ?

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>

我使用了@KirkLarkin的问题评论中提出的方法,并在整个依赖关系链中添加了NuGet包。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM