dotnet/roslyn

CS1705 must indicate which library with the conflict

Open

#66,161 创建于 2022年12月30日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)C# (4,257 fork)batch import
Area-CompilersConcept-Diagnostic Clarityhelp wanted

仓库指标

Star
 (20,414 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

Version Used:

Problem:

CS1705 errors like are not very helpfull:

Assembly 'AssemblyName1' uses 'TypeName' which has a higher version than referenced assembly 'AssemblyName2'

When one of the assemblies is not directly referenced by the my code. E.g. using two public libraries where each of them uses a different version of the same library. I as the developer must traverse the chain of assembly references for all referenced assemblies

Expected Behavior:

Assembly 'AssemblyName1' with identity 'AssemblyName1 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.Extensions.Configuration.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.Extensions.Configuration.Abstractions' with identity 'Microsoft.Extensions.Configuration.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'AssemblyName2' which is used by 'AssemblyName3' (all the way to the highest level assembly/NuGet package)

Actual Behavior:

Assembly 'AssemblyName1' with identity 'AssemblyName1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.Extensions.Configuration.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.Extensions.Configuration.Abstractions' with identity 'Microsoft.Extensions.Configuration.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

贡献者指南