Bug 45130 - Found conflicts between different versions of the same dependent assembly
Summary: Found conflicts between different versions of the same dependent assembly
Status: RESOLVED DUPLICATE of bug 44193
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-06 18:02 UTC by John Miller [MSFT]
Modified: 2016-10-28 23:05 UTC (History)
9 users (show)

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


Attachments
Sample Project (61.62 KB, application/zip)
2016-10-06 18:02 UTC, John Miller [MSFT]
Details
Error Message (4.89 KB, text/plain)
2016-10-13 15:40 UTC, John Miller [MSFT]
Details
Sample project with the same warnings (53.21 KB, application/x-rar)
2016-10-15 13:40 UTC, julien.wendling@gmail.com
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 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 DUPLICATE of bug 44193

Description John Miller [MSFT] 2016-10-06 18:02:26 UTC
**Overview**:

When building projects, a warning is outputted and it's unclear on how to resolve it. The suggested binding redirect does not always resolve the warning. 

**Steps to Reproduce**:

1. Rebuild the attached project in VS
2. Observe the warning messages in the ErrorList menu

**Actual Results**:

See attached text file for full warning message.

**Expected Results**:

No warnings.

**Build Date & Platform**:

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA000
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA000
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA000
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA000
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA000
Windows Phone SDK 8.0 - ENU

ASP.NET and Web Tools 2015.1   14.1.20907.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.8.1   14.0.11123.0
Azure App Service Tools v2.8.1

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

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

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft .NET Core Tools (Preview 2)   14.1.20907.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

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

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Unity   2.3.0.0
Visual Studio Tools for Unity

Xamarin   4.2.0.703 (3b7df6f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.1.3 (96c7ba6)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.0.1.10 (ad1cd42)
Visual Studio extension to enable development for Xamarin.iOS.

**Additional Information**:

http://forums.xamarin.com/discussion/comment/225729/#Comment_225729
http://forums.xamarin.com/discussion/comment/225728/#Comment_225728
Comment 1 John Miller [MSFT] 2016-10-06 18:02:44 UTC
Created attachment 17912 [details]
Sample Project
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2016-10-13 14:58:44 UTC
"See attached text file for full warning message."

No text file was attached.


I suspect this might be a duplicate of Bug 44193, but it'd be best to have the warnings to compare against.
Comment 3 John Miller [MSFT] 2016-10-13 15:40:54 UTC
Created attachment 18025 [details]
Error Message

Added the error text that was missing
Comment 4 julien.wendling@gmail.com 2016-10-15 13:40:42 UTC
Created attachment 18055 [details]
Sample project with the same warnings
Comment 5 julien.wendling@gmail.com 2016-10-15 13:42:05 UTC
I have the same warnings on a current project.

I cleaned it and uploaded the solution.
Comment 6 Sam 2016-10-20 14:42:33 UTC
I am having this problem also, with System.Xml and others.

No way to resolve conflict between "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.

The reference that I added is this:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll

For some reason, this is being used instead:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile78\System.Xml.dll

The path if I look at properties of the reference is the path of the 2.0.5.0 dll, but the 4.0.0.0 one is being used in it's place. I have had issues with this in iOS & System.Net.Http which I was able to fix with app.config, but android seems to ignore the app.config.
Comment 7 John Miller [MSFT] 2016-10-26 13:19:05 UTC
Changing back to New because I don't see any other requests for info that is needed.
Comment 10 Brendan Zagaeski (Xamarin Team, assistant) 2016-10-28 23:05:15 UTC
## Regression status: Regression in Cycle 8 compared to Cycle 7 – Service Release 1

BAD:  XamarinVS 4.2.1.15  (2ecdcdd) (with Xamarin.Android 7.0.2.28 (d3dc82d))
(Cycle 8 – Service Release 1, current Beta)

BAD:  XamarinVS 4.2.0.680 (c4382f5) (with Xamarin.Android 7.0.0.18 (0e59c36))
(Cycle 8)

GOOD: XamarinVS 4.1.2.18  (fcbe082) (with Xamarin.Android 6.1.2.21 (1cf254d))
(Cycle 7 – Service Release 1)


(I tested with a new template "Visual C# > Cross-Platform > Blank App (Xamarin.Forms Portable)" project as well as the test case from Comment 1.  The results were the same for both cases.)




## Verification status (by manually applying the candidate fix from Bug 44193, Comment 20)

GOOD: XamarinVS 4.2.1.15 (2ecdcdd) after manually adjusting the .targets file [1] as per the pull request from [2]

[1] %ProgramFiles(x86)%\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 

[2] https://github.com/xamarin/xamarin-android/pull/273/files




## BAD results 

The build completes successfully, but produces a warning that is identical to the warning for Bug 44193:

> warning MSB3247: Found conflicts between different versions of the same
> dependent assembly. In Visual Studio, double-click this warning (or select it
> and press Enter) to fix the conflicts; otherwise, add the following binding
> redirects to the "runtime" node in the application configuration file: 
> 
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.RegularExpressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.IO" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Globalization" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Diagnostics.Debug" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Xml.ReaderWriter" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.ObjectModel" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Linq" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.Extensions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Collections" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Threading" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.Encoding" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Reflection" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Linq.Expressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Threading.Tasks" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Dynamic.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>



## GOOD results (with the .targets file fix or the Cycle 7 SR 1 versions)

The build completes with 0 warnings and 0 errors.




## Additional test environment info (brief)

Microsoft Visual Studio Enterprise 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Windows 10, Version 1607 (OS Build 14393.187)

*** This bug has been marked as a duplicate of bug 44193 ***