CS1705 must indicate which library with the conflict
#66.161 geöffnet am 30. Dez. 2022
Repository-Metriken
- Stars
- (20.414 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)
Beschreibung
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'