Skip to content

Warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. on .NET Framework 4.7.1 #381

@jemiller0

Description

@jemiller0

I'm in the process of trying to upgrade my applications to .NET Framework 4.7.1 and I ran into the following warning when building the apps.

1>------ Rebuild All started: Project: ConsoleApp7, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1988,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
1>  ConsoleApp7 -> C:\Users\jemiller\Documents\Visual Studio 2017\Projects\ConsoleApp7\ConsoleApp7\bin\Debug\ConsoleApp7.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

If you set Tools|Options|Projects and Solutions|Build and Run|MSBuild project build output verbosity to Detailed you can see that it appears that there is a conflict with System.Runtime.InteropServices.RuntimeInformation.

1>  There was a conflict between "System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.InteropServices.RuntimeInformation, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>      "System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Runtime.InteropServices.RuntimeInformation, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
1>      References which depend on "System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\jemiller\Documents\Visual Studio 2017\Projects\ConsoleApp7\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll].
1>          C:\Users\jemiller\Documents\Visual Studio 2017\Projects\ConsoleApp7\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
1>            Project file item includes which caused reference "C:\Users\jemiller\Documents\Visual Studio 2017\Projects\ConsoleApp7\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll".
1>              System.Runtime.InteropServices.RuntimeInformation
1>      References which depend on "System.Runtime.InteropServices.RuntimeInformation, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\Facades\System.Runtime.InteropServices.RuntimeInformation.dll].
1>          C:\Users\jemiller\Documents\Visual Studio 2017\Projects\ConsoleApp7\packages\MySqlConnector.0.29.2\lib\net46\MySqlConnector.dll
1>            Project file item includes which caused reference "C:\Users\jemiller\Documents\Visual Studio 2017\Projects\ConsoleApp7\packages\MySqlConnector.0.29.2\lib\net46\MySqlConnector.dll".
1>              MySqlConnector, Version=0.29.2.0, Culture=neutral, processorArchitecture=MSIL
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1988,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.

Is there something that can be done with the NuGet package to eliminate this warning? I tested this by creating a .NET Framework 4.7.1 console application with nothing else in it and right after adding the latest MySqlConnector package, it gives the errors when you do a build. Also, I tried updating the dependent packages since there were updates and the problem still occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions