Forum Visual Studio

Found conflicts between different versions of the same dependent assembly.

DennisSmith.2007DennisSmith.2007 NLMember
edited April 2016 in Visual Studio

Started working on a team project. The initial code was made in Xamarin Forms. Since I'm working on windows, and Xamarin forms is no longer available, I'm using Visual Studio 2015 update 2 professional.

  1. My colleague working in Xamarin Forms on Mac, uploaded the source to GIT.
  2. Me on my PC and Visual Studio 2015 update 2 prof with Xamarin, cloned the source from GIT.

After a few build/refresh Nuget packages download, the project started building. But I do get a warning;

file: Xamarin.Android.Common.targets

Message;

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="Microsoft.CSharp" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding>

Debug log;

1> Consider app.config remapping of assembly "Microsoft.CSharp, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "2.0.5.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Microsoft.CSharp.dll] to Version "4.0.0.0" [C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll] to solve conflict and get rid of warning. (TaskId:143) 1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1904,3): 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="Microsoft.CSharp" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding> 1>

along with;

Severity Code Description Project File Line Suppression State Warning 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. [filename].Droid C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1820

I've googled for a day or two and;
-I've turned on the verbose debugging to find it has the same problems with Microsoft.CSharp, system.core, system.xml
-I suppose there is no app.config for Xamarin projects?
-Also, I get a lot of error on XAML files. If I open them, press CTRL-S, they are gone. But they keep reappearing once in a while...

I don't know how to solve this, in the 'References' I've tried to copy these local, and turn on version specific. But the warning keeps comming...

Answers

  • PaulMorrisPaulMorris USMember ✭✭

    We are getting the same error for System.Numerics, System.IO.Compression and NewtonSoft.Json. We have tried adding the recommended mappings to app.config files in the projects as well as checking for any discrepancies in our references to those same assemblies. We have also tried setting AutoGenerateBindingRedirects to true in the csproj files and none of those have helped. Does anyone have any insight on this?

  • CostasAletrariCostasAletrari USMember ✭✭

    Having the same issue atm

  • WooszWoosz NLMember

    I'm also having this issue, but only with Microsoft.CSharp. Also using Newtonsoft.Json, but no problems with that

  • DevCoderDevCoder DOMember

    something solution? i have the same problem

  • rseostarrseostar USUniversity ✭✭
  • titolerutitoleru Member ✭✭

    I still have the same problem in 2021

Sign In or Register to comment.