.NET Core - MSB3277: Found conflicts between different versions

Stewart_R picture Stewart_R · Aug 2, 2017 · Viewed 7.8k times · Source

I am having difficulty getting rid of the build warning:

warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved

specifically in .NET core projects.

In a full .NET framework project I would add some binding redirects so I googled around that issue and found this answer suggesting adding the following to the .csproj file:

<PropertyGroup>
  <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>

I have done this but to no avail - I still get the build warnings. Anything else I can do?

Answer

Martin Ullrich picture Martin Ullrich · Aug 3, 2017

I had a look at your project and the problem seems to be a conflict with the versions that Rssdp was built against and the assembly version that the referenced System.Net.Http version (4.3.0) provides as compile-time reference.

This can be fixed by updating System.Net.Http to 4.3.2.

<PackageReference Include="System.Net.Http" Version="4.3.2"/>