Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting assembly conflict warnings on net471 after updating to 0.14.0 from 0.13.12 #2678

Open
DamianEdwards opened this issue Dec 20, 2024 · 0 comments

Comments

@DamianEdwards
Copy link
Member

Updating the project at https://github.com/DamianEdwards/MiniValidation/tree/main/tests/MiniValidation.Benchmarks to BenchmarkDotNet 0.14.0 results in a bunch of assembly conflict warnings during build (MSB3277) for the following assemblies:

  • System.Collections.Immutable: 5.0.0.0 and 8.0.0.0
  • System.Runtime.CompilerServices.Unsafe: 5.0.0.0 and 6.0.0.0
  • System.Reflection.Metadata: 5.0.0.0 and 8.0.0.0

The project multi-targets net471;net8.0 when built on Windows. The warnings are not present when using BenchmarkDotNet version 0.13.12

Full warning text:

Found conflicts between different versions of "System.Collections.Immutable" that could not be resolved.
There was a conflict between "System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    "System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
    References which depend on "System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [D:\packages\nuget\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll].
        D:\packages\nuget\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll
          Project file item includes which caused reference "D:\packages\nuget\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll".
            D:\packages\nuget\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll
    References which depend on or have been unified to "System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
        D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
          Project file item includes which caused reference "D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll".
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
        D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll".
            D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
            D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
        D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll".
            D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
        D:\packages\nuget\microsoft.diagnostics.runtime\2.2.332302\lib\netstandard2.0\Microsoft.Diagnostics.Runtime.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.diagnostics.runtime\2.2.332302\lib\netstandard2.0\Microsoft.Diagnostics.Runtime.dll".
            D:\packages\nuget\microsoft.diagnostics.runtime\2.2.332302\lib\netstandard2.0\Microsoft.Diagnostics.Runtime.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
        D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll".
            D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
        D:\packages\nuget\system.reflection.metadata\5.0.0\lib\net461\System.Reflection.Metadata.dll
          Project file item includes which caused reference "D:\packages\nuget\system.reflection.metadata\5.0.0\lib\net461\System.Reflection.Metadata.dll".
            D:\packages\nuget\system.reflection.metadata\5.0.0\lib\net461\System.Reflection.Metadata.dll


Found conflicts between different versions of "System.Runtime.CompilerServices.Unsafe" that could not be resolved.
There was a conflict between "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
    References which depend on "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [D:\packages\nuget\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll].
        D:\packages\nuget\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
          Project file item includes which caused reference "D:\packages\nuget\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll".
            D:\packages\nuget\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
    References which depend on or have been unified to "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
        D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
          Project file item includes which caused reference "D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll".
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
        D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll".
            D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
            D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
        D:\packages\nuget\microsoft.diagnostics.runtime\2.2.332302\lib\netstandard2.0\Microsoft.Diagnostics.Runtime.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.diagnostics.runtime\2.2.332302\lib\netstandard2.0\Microsoft.Diagnostics.Runtime.dll".
            D:\packages\nuget\microsoft.diagnostics.runtime\2.2.332302\lib\netstandard2.0\Microsoft.Diagnostics.Runtime.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
        D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll".
            D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
        D:\packages\nuget\microsoft.extensions.primitives\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.extensions.primitives\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll".
            D:\packages\nuget\microsoft.extensions.primitives\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
            D:\packages\nuget\microsoft.extensions.configuration\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll
            D:\packages\nuget\microsoft.extensions.configuration.abstractions\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll
            D:\packages\nuget\microsoft.extensions.configuration.binder\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll
            D:\packages\nuget\microsoft.extensions.options\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll
            D:\packages\nuget\microsoft.extensions.logging\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.dll
        D:\packages\nuget\system.memory\4.5.5\lib\net461\System.Memory.dll
          Project file item includes which caused reference "D:\packages\nuget\system.memory\4.5.5\lib\net461\System.Memory.dll".
            D:\packages\nuget\system.memory\4.5.5\lib\net461\System.Memory.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
            D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
            D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
            D:\packages\nuget\microsoft.diagnostics.runtime\2.2.332302\lib\netstandard2.0\Microsoft.Diagnostics.Runtime.dll
            D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll
            D:\packages\nuget\microsoft.extensions.primitives\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
            D:\packages\nuget\microsoft.extensions.configuration\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll
            D:\packages\nuget\microsoft.extensions.configuration.abstractions\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll
            D:\packages\nuget\microsoft.extensions.configuration.binder\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll
            D:\packages\nuget\microsoft.extensions.options\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll
            D:\packages\nuget\microsoft.extensions.logging\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.dll
            D:\packages\nuget\perfolizer\0.3.17\lib\netstandard2.0\Perfolizer.dll
            D:\packages\nuget\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll
        D:\packages\nuget\system.text.encoding.codepages\4.5.1\lib\net461\System.Text.Encoding.CodePages.dll
          Project file item includes which caused reference "D:\packages\nuget\system.text.encoding.codepages\4.5.1\lib\net461\System.Text.Encoding.CodePages.dll".
            D:\packages\nuget\system.text.encoding.codepages\4.5.1\lib\net461\System.Text.Encoding.CodePages.dll
            D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
            D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
        D:\packages\nuget\system.threading.tasks.extensions\4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
          Project file item includes which caused reference "D:\packages\nuget\system.threading.tasks.extensions\4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll".
            D:\packages\nuget\system.threading.tasks.extensions\4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
            D:\packages\nuget\microsoft.bcl.asyncinterfaces\1.1.0\ref\net461\Microsoft.Bcl.AsyncInterfaces.dll
            D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
            D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
            D:\packages\nuget\microsoft.diagnostics.netcore.client\0.2.251802\lib\netstandard2.0\Microsoft.Diagnostics.NETCore.Client.dll
            D:\packages\nuget\microsoft.diagnostics.runtime\2.2.332302\lib\netstandard2.0\Microsoft.Diagnostics.Runtime.dll



Found conflicts between different versions of "System.Reflection.Metadata" that could not be resolved.
There was a conflict between "System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Reflection.Metadata, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    "System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Reflection.Metadata, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
    References which depend on "System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [D:\packages\nuget\system.reflection.metadata\5.0.0\lib\net461\System.Reflection.Metadata.dll].
        D:\packages\nuget\system.reflection.metadata\5.0.0\lib\net461\System.Reflection.Metadata.dll
          Project file item includes which caused reference "D:\packages\nuget\system.reflection.metadata\5.0.0\lib\net461\System.Reflection.Metadata.dll".
            D:\packages\nuget\system.reflection.metadata\5.0.0\lib\net461\System.Reflection.Metadata.dll
    References which depend on or have been unified to "System.Reflection.Metadata, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
        D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll".
            D:\packages\nuget\microsoft.codeanalysis.common\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
            D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
        D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll".
            D:\packages\nuget\microsoft.codeanalysis.csharp\4.1.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
        D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll
          Project file item includes which caused reference "D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll".
            D:\packages\nuget\microsoft.diagnostics.tracing.traceevent\3.1.8\lib\netstandard2.0\Microsoft.Diagnostics.Tracing.TraceEvent.dll
            D:\packages\nuget\benchmarkdotnet\0.14.0\lib\netstandard2.0\BenchmarkDotNet.dll
@DamianEdwards DamianEdwards changed the title Getting numerous assembly conflict warnings on net471 after updating to 0.14.0 from 0.13.12 Getting assembly conflict warnings on net471 after updating to 0.14.0 from 0.13.12 Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant