Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Consider app.config remapping of assembly with no app.config mapping

How can I determine where to fix this reference without adding a binding to the app.config?

Consider app.config remapping of assembly "System.Runtime.Serialization.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [] to Version "4.1.2.0" [F:\Production\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll] to solve conflict and get rid of warning. 12>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): 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:

like image 813
Mike Flynn Avatar asked Aug 01 '17 17:08

Mike Flynn


3 Answers

How can I determine where to fix this reference without adding a binding to the app.config?

You can try to change the "MSBuild project build output verbosity" to "Detailed" or above to check the detail error log. To do this by Tools -> Options...->Projects and Solutions->Build and Run. Set the MSBuild project build output verbosity level to Detailed or above. Build the project and checkout the error log in the output window. The ResolveAssemblyReferences task, which is the task from which MSB3247 originates, should help you debug this particular issue.

enter image description here

Then go to the project with the older version, removed the reference, then added the correct reference.

like image 113
Leo Liu-MSFT Avatar answered Nov 11 '22 10:11

Leo Liu-MSFT


I solved this by targeting a higher .Net Framework version. Switched from 4.7 to 4.7.2 and the warnings went away. The warnings started after I switched from EF6 to EF.Core

like image 11
Matthias Güntert Avatar answered Nov 11 '22 08:11

Matthias Güntert


The real problem is that the References in the .csproj file are not updated when doing a nuget update, hence the warning to override these in the app.config. If you update the .csproj, all warnings go away.

like image 6
balint Avatar answered Nov 11 '22 08:11

balint