Bug 57972 - warning MSB3276 and warning MSB3277 - Found conflicts between different versions of the same dependent assembly that could not be resolved.
Summary: warning MSB3276 and warning MSB3277 - Found conflicts between different versi...
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 10.10 (d15-2)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-06 10:02 UTC by Saravanan
Modified: 2017-09-25 20:38 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Diagnostic log file (3.91 MB, text/plain)
2017-07-07 06:37 UTC, Saravanan
Details
Simple project + build logs (54.42 KB, application/zip)
2017-09-25 20:38 UTC, Eric Goulet
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Saravanan 2017-07-06 10:02:31 UTC
Getting below warning while executing MSBuild command.

No way to resolve conflict between "System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
  No way to resolve conflict between "System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
  No way to resolve conflict between "System.Text.Encoding, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Text.Encoding, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Text.Encoding, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
  No way to resolve conflict between "System.Threading, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Threading, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Threading, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
  No way to resolve conflict between "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
  Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [] to Version "4.1.0.0" [/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades/System.Runtime.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Collections, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [] to Version "4.0.10.0" [/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades/System.Collections.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Threading, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [] to Version "4.0.10.0" [/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades/System.Threading.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "websocket-sharp, Culture=neutral, PublicKeyToken=5660b08a1845a91e" from Version "1.0.2.19751" [/Users/Shared/Jenkins/.jenkins/jobs/B1_Debug/workspace/Programmer/com/medtronic/Programmer/Programmer.iOS/bin/iPhone/Debug/websocket-sharp.dll] to Version "1.0.2.19758" [/Users/Shared/Jenkins/.jenkins/jobs/B1_Debug/workspace/Components/SOUP/org/websocket-sharp/websocket-sharp/bin/Release/websocket-sharp.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Text.Encoding, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [] to Version "4.0.10.0" [/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades/System.Text.Encoding.dll] to solve conflict and get rid of warning.
/Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. 


Please let me know why we are getting these warning in some project?
Is it issue with specific xamarin assembly?
How to resolve without setting "AutoGenerateBindingRedirects"?
Comment 1 Saravanan 2017-07-06 10:19:25 UTC
System Info:

Xamarin Studio Community
Version 6.3 (build 864)
Installation UUID: dfbf346f-829a-4a9c-9284-2bbb8d483d11
Runtime:
	Mono 5.0.0.100 (2017-02/9667aa6) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 500000100

NuGet
Version: 3.5.0.0

Xamarin.Profiler
'/Applications/Xamarin Profiler.app' not found

Xamarin.Android
Not Installed

Apple Developer Tools
Xcode 8.3.1 (12170)
Build 8E1000a

Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Xamarin.iOS
Version: 10.10.0.33 (Xamarin Studio Community)
Hash: 3e5ac5ff
Branch: d15-2
Build date: 2017-05-05 18:11:38-0400

Xamarin Inspector
Not Installed

Build Information
Release ID: 603000864
Git revision: 6c2f6737278ccc3e81e12276d49c0d92f975f189
Build date: 2017-04-24 11:26:01-04
Xamarin addins: d8d46e577d8507c35260ce9d73df3c33415bb214
Build lane: monodevelop-lion-d15-1

Operating System
Mac OS X 10.12.0
Darwin Maithri-iMac.local 16.0.0 Darwin Kernel Version 16.0.0
    Mon Aug 29 17:56:20 PDT 2016
    root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
Comment 2 Timothy Risi 2017-07-06 17:44:58 UTC
Please include your full build logs, crash reports (if any), and a test case (to reproduce) 

To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run

On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.
Comment 3 Saravanan 2017-07-07 06:37:06 UTC
Created attachment 23368 [details]
Diagnostic log file
Comment 4 Saravanan 2017-07-07 06:41:43 UTC
Please find attached diagnostic log file (BuildLog.txt).
Please provide me solution for "warning MSB3277".

How to find out the warnings coming from which DLL?
I would like to know that what binding policy we need to do?
Comment 5 Saravanan 2017-07-10 09:38:53 UTC
Please provide solution. Build diagnostic log attached.
Comment 6 Timothy Risi 2017-07-10 19:31:23 UTC
Do you have a simple repro project you can provide?
Comment 7 Saravanan 2017-07-11 11:09:11 UTC
Could not create sample project with the scenario. Below are the warnings, if i add <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> in project file the warnings disappeared. 

Please let me know How to find out the warnings coming from which DLL? Based on my analysis its coming from some of Xamarin DLLs. Please check attached diagnostic logs.
What is correct binding policy to fix these warnings?


/Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. 

/Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.
Comment 8 Jeffrey Stedfast 2017-07-12 14:56:14 UTC
AutoGenerateBindingRedirects doesn't seem to be anything to do with iOS or Mac MSBuild targets.

A Google search turns this up: https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection

Are you trying to build a .NET app instead of a Xamarin.Mac app?
Comment 9 Alex Soto [MSFT] 2017-09-13 16:11:14 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!
Comment 10 Eric Goulet 2017-09-25 20:37:20 UTC
I have the same issue when I import the NuGet Microsoft.AspNetCore.JsonPatch v1.1.2 in my project. I added the dependentAssembly setting in the app.config but I still get the warning.

The attachement file WarningConflictVersions.zip contains a simple project to reproduce the warning and the build log at verbosity "detailed".

Visual Studio versions details: 

Microsoft Visual Studio Professional 2017 
Version 15.3.5
VisualStudio.15.Release/15.3.5+26730.16
Microsoft .NET Framework
Version 4.7.02053

Installed Version: Professional

Visual Basic 2017   00369-60000-00001-AA529
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA529
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA529
Microsoft Visual C++ 2017

Add New File   3.5
The fastest and easiest way to add new files to any project - including files that start with a dot

ASP.NET and Web Tools 2017   15.0.30726.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Template Engine 2017   15.0.30726.0
ASP.NET Template Engine 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50601.0
For additional information, visit https://www.asp.net/

AutoT4   1.0
A zero-configuration extension for Visual Studio 2012 which will automatically run your T4 templates at build time.

Azure App Service Tools v3.0.0   15.0.30728.0
Azure App Service Tools v3.0.0

Bundler & Minifier   2.5.359
Adds support for bundling and minifying JavaScript, CSS and HTML files in any project.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

CSS Tools   1.0.14
Provides additional features to the CSS editor in Visual Studio.

File Icons   2.7
Adds icons for files that are not recognized by Solution Explorer

File Nesting   2.6.67
Automatically nest files based on file name and enables developers to nest and unnest any file manually

HTML Tools   1.0.3
Productivity tools for the HTML editor

Image Optimizer   3.6.103
Uses industry standard tools to optimize any JPEG, PNG and Gifs - including animated Gifs. Can do both lossy and lossless optimization.

Image Sprites   1.4.47
Boost your website's performance by creating image sprites to reduce the amount of HTTP requests needed.

JavaScript Language Service   2.0
JavaScript Language Service

JetBrains ReSharper Ultimate 2017.2    Build 109.0.20170824.131346
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

Markdown Editor   1.11.214
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Mono Debugging for Visual Studio   4.6.8-pre (ec7034f)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.3.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Open Command Line   2.1.179
Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.

Package Installer   2.0.101
Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project

Package Security Alerts   1.0.17
Identifies npm and Bower packages that contains known security vulnerabilities to ensure your project is always using the most secure package versions.

SQL Server Data Tools   15.1.61707.200
Microsoft SQL Server Data Tools

Syntax Highlighting Pack   2.7.125
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...

TypeScript   2.3.4.0
TypeScript tools for Visual Studio

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Vue.js Pack 2017   1.1.8
Contains HTML Intellisense and code snippets for the Vue.js JavaScript library

Web Accessibility Checker   1.5.56
The easiest way to perform accessibility checks on any ASP.NET web application. Fully customizable and support all the major international accessibility standards.

Web Compiler   1.11.326
Compiler for LESS, Sass and CoffeeScript files

Web Essentials 2017   1.5.31
The easiest way to set up Visual Studio for the ultimate web development experience. Requires Visual Studio 2017 Update 3 or newer

Xamarin   4.7.9.45 (bd7e3753c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.4.5.1 (fb018c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   11.0.0.0 (152b654)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

ZenCoding   1.2.11
Provides ZenCoding for the HTML Editor - full support for static HTML, Razor and WebForms.
Comment 11 Eric Goulet 2017-09-25 20:38:03 UTC
Created attachment 24923 [details]
Simple project + build logs