Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

System.ValueTuple issue #463

Closed
ErikEJ opened this issue Jul 3, 2017 · 28 comments
Closed

System.ValueTuple issue #463

ErikEJ opened this issue Jul 3, 2017 · 28 comments

Comments

@ErikEJ
Copy link
Owner

ErikEJ commented Jul 3, 2017

Try to reference .NET standard version iso 4.6.1 version of the lib!
Also, clear packages folder and restore from Nuget.org only

@jcouv
Copy link

jcouv commented Jul 3, 2017

@ErikEJ Could you describe the symptoms in more details?
I assume you are getting a System.IO.FileLoadException on ValueTuple as Julie (in the linked issue). If so, the linked issue has some recommended steps for troubleshooting (verify the binaries in the working folder, run fusion log viewer to capture details about the runtime failing to load the assembly).

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jul 3, 2017

@jcouv I have done some troubleshooting and provided detailed info here: dotnet/efcore#9046

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jul 3, 2017

file is present: Assembly version: 4:0:2:0, file version: 4.6.25331.2
Package version: 4.4.0-preview2-25405-01

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jul 3, 2017

Sharing fusion log:

*** Assembly Binder Log Entry (03-07-2017 @ 21:29:11) ***

The operation failed.
Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Code\EntityFramework.SqlServerCompact\packages\xunit.runner.console.2.2.0\tools\xunit.console.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
(Fully-specified)
LOG: Appbase = file:///C:/Code/EntityFramework.SqlServerCompact/test/EntityFramework.SqlServerCompact35.FunctionalTests/bin/Debug
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = C:\Users\Erik\AppData\Local\Temp\19655a91-eed4-4c0d-aa1b-34c6a70b7f13
LOG: AppName = 19655a91-eed4-4c0d-aa1b-34c6a70b7f13
Calling assembly : netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Code\EntityFramework.SqlServerCompact\packages\xunit.runner.console.2.2.0\tools\xunit.console.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Code/EntityFramework.SqlServerCompact/test/EntityFramework.SqlServerCompact35.FunctionalTests/bin/Debug/System.ValueTuple.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Code\EntityFramework.SqlServerCompact\test\EntityFramework.SqlServerCompact35.FunctionalTests\bin\Debug\System.ValueTuple.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Setup failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

*** Assembly Binder Log Entry (03-07-2017 @ 21:29:11) ***

The operation failed.
Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Code\EntityFramework.SqlServerCompact\packages\xunit.runner.console.2.2.0\tools\xunit.console.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
(Fully-specified)
LOG: Appbase = file:///C:/Code/EntityFramework.SqlServerCompact/test/EntityFramework.SqlServerCompact35.FunctionalTests/bin/Debug
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = C:\Users\Erik\AppData\Local\Temp\19655a91-eed4-4c0d-aa1b-34c6a70b7f13
LOG: AppName = 19655a91-eed4-4c0d-aa1b-34c6a70b7f13
Calling assembly : netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Code\EntityFramework.SqlServerCompact\packages\xunit.runner.console.2.2.0\tools\xunit.console.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Code/EntityFramework.SqlServerCompact/test/EntityFramework.SqlServerCompact35.FunctionalTests/bin/Debug/System.ValueTuple.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Code\EntityFramework.SqlServerCompact\test\EntityFramework.SqlServerCompact35.FunctionalTests\bin\Debug\System.ValueTuple.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Setup failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

@jcouv
Copy link

jcouv commented Jul 3, 2017

Thanks for the fusion log.
If I read this correctly, the ValueTuple assembly is found (at C:\Code\EntityFramework.SqlServerCompact\test\EntityFramework.SqlServerCompact35.FunctionalTests\bin\Debug\System.ValueTuple.dll), but it has version 4.0.2.0 (which is correct), whereas the requested assembly has version 0.0.0.0.

The next step would be to figure out which assembly has this 0.0.0.0 reference. The fusion log says "Calling assembly : netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" so I suspect the problem is with the integration of ValueTuple with netstandard.
Ping @ericstj @weshaggard for advice.

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jul 4, 2017

Would a binding redirect unbkock me?

@jcouv
Copy link

jcouv commented Jul 4, 2017

Possibly. That's worth trying.

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jul 4, 2017

Someone else did, and he claims it works: dotnet/efcore#9046 (comment)
But it is not really a viable solution, as the reirect is not created by nuget

@julielerman
Copy link

Glad to see Julien found his way here to help you! What a good team! Now I'll get back to preparing my conference demos for tomorrow morning's session!! :)

@divega
Copy link
Contributor

divega commented Jul 5, 2017

@jcouv @ericstj @weshaggard I want to make sure if there is an issue in the way .NET Standard references ValueTuple, it doesn't get lost.

In the current state of things, apparently the experience of using this particular EF Core provider (which is designed to work only on .NET Framework) is severely affected by having to manually add a binding redirects, and we suspect any other library targeting .NET Standard and using ValueTuple may be affected in a similar way.

@divega
Copy link
Contributor

divega commented Jul 5, 2017

cc @ajcvickers

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jul 6, 2017

@divega Thank you very much!

@julielerman
Copy link

Yes, thank you @divega !!

@weshaggard
Copy link

weshaggard commented Jul 10, 2017

@divega as I just commented on the other issue dotnet/efcore#9046 (comment), the binding redirects should get automatically generated if the right properties are setup.

For applications (i.e. exe) projects need to have

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

However for test projects which aren't an .exe you need to force the redirects to get generated by also setting:

<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>

While it isn't ideal the .NET Framework binding policy is pretty strict so the binding redirects are needed.

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jul 10, 2017

@weshaggard Thanks for the info, all interesting. but cannot see how this improves the experience for devs creating a classic .exe project ?? Is the AutGenerate.... setting always true??

@weshaggard
Copy link

Yes for any new .NET Framework .exe projects AutoGenerateBindingRedirects is set to true so unless they explicitly set it to false or are pulling forward an old project that didn't have it set then they will get the redirects automatically generated.

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jul 10, 2017

Great news... I will do some testing!

@thomaswolff
Copy link

thomaswolff commented Jul 31, 2017

In my project we have an Azure Function App targeting .NET Framework 4.6.1 which is referencing a data access layer implemented as a .NET Standard 2.0 class library which in turn uses Microsoft.EntityFrameworkCore.SqlServer 2.0.0-preview2-final. When trying to save changes to domain object using our DbContext, we get the same error message as mentioned in several threads earlier:

An exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.EntityFrameworkCore.dll but was not handled in user code Could not load file or assembly 'System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

The suggested solution in dotnet/efcore#9046 seems to be adding a binding redirect as such:

<dependentAssembly> <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" /> <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> </dependentAssembly>

Can anyone assist me with where this binding redirect should be added? Is it in the Azure Function App project or in the data access layer class library? Which file should it be added to?

I have tried putting:

<configuration> <runtime> <assemblyBinding> <dependentAssembly> <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" /> <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>

in a file called app.config in the root directory of both the Azure Function app and the class library, without any luck.

Any help on this matter would be much appreciated.

@thomaswolff
Copy link

We found a solution to our problem, which was defining a binding redirect inan Azure Function App. Read this blog post to see the solution: https://codopia.wordpress.com/2017/07/21/how-to-fix-the-assembly-binding-redirect-problem-in-azure-functions/

@bubibubi
Copy link

Still having the same issue here (net461).
Also in a new console application project (that does not references ValueTuple library directly)
I've tried:

  1. assembly binding in App.config

      <dependentAssembly>
        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" />
        <bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0" />
      </dependentAssembly>
  1. Adding
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    to csproj
  2. Explicitly inlcuding ValueTuple in the console project via NuGet and referencing the assembly

@ErikEJ
Copy link
Owner Author

ErikEJ commented Aug 20, 2017

@bubibubi Is this a SQL CE solution? Are you using VS 2017 15.3?

Can you provide a repro project?

@bubibubi
Copy link

bubibubi commented Aug 20, 2017 via email

@ErikEJ
Copy link
Owner Author

ErikEJ commented Aug 20, 2017

Can you provide a repro project?

@ErikEJ ErikEJ reopened this Aug 20, 2017
@bubibubi
Copy link

I'm looking at packages.config. I think that the problem is related to libraries versions. My System.* libraries are generally 4.3, yours are 4.0 or 4.1. I restart from your packages.config and I see wat happen.

@bubibubi
Copy link

I could solve the issue:

  1. rolling back every NuGet update
  2. removing AutoGenerateBindingRedirects from csproj
  3. adding this line
    <Import Project="..\..\build\common.props" />
    to my console project source code (considering it in the src or test directory of EF/Ef Provider).

I'm still receiving several compile warnings from my Console application. I should probably restart from a new csproj.

3>  Consider app.config remapping of assembly "System.Runtime.Serialization.Xml, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Serialization.Xml.dll] to Version "4.1.3.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.Serialization.Xml.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Data.Common, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Data.Common.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Net.Requests, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Net.Requests.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Net.Requests.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Diagnostics.Tools, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Diagnostics.Tools.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Diagnostics.Tools.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Runtime.Serialization.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Serialization.Primitives.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.Serialization.Primitives.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Threading.Tasks.Parallel, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Threading.Tasks.Parallel.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Threading.Tasks.Parallel.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Linq.Expressions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Linq.Expressions.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Linq.Expressions.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Xml.XPath.XDocument, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Xml.XPath.XDocument.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.ObjectModel, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ObjectModel.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.ObjectModel.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Xml.XDocument, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Xml.XDocument.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Xml.XDocument.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.ComponentModel.Annotations, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ComponentModel.Annotations.dll] to Version "4.2.0.0" [C:\Develop\ForPlanning\EntityFrameworkCore.Jet\packages\System.ComponentModel.Annotations.4.4.0\lib\net461\System.ComponentModel.Annotations.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Globalization.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Globalization.Extensions.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Net.Http.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Net.Http.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Xml.XmlSerializer, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Xml.XmlSerializer.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Xml.XmlSerializer.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Diagnostics.StackTrace, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Diagnostics.StackTrace.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Linq.Parallel, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Linq.Parallel.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Linq.Parallel.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Security.Cryptography.Algorithms, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.3.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Security.Cryptography.Algorithms.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Linq, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Linq.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Linq.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.ComponentModel, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ComponentModel.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.ComponentModel.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Runtime.Serialization.Json, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Serialization.Json.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.Serialization.Json.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Reflection.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Primitives.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Reflection.Primitives.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Dynamic.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Dynamic.Runtime.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Dynamic.Runtime.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Diagnostics.Tracing, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.20.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Diagnostics.Tracing.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Diagnostics.Tracing.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Collections.Concurrent, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Collections.Concurrent.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Collections.Concurrent.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Security.Principal, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Security.Principal.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Security.Principal.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Runtime.Numerics, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Numerics.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.Numerics.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Runtime.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Extensions.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.Extensions.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Diagnostics.Contracts, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Diagnostics.Contracts.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Diagnostics.Contracts.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.IO.Compression, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.IO.Compression.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.IO.Compression.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Threading.Tasks, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Threading.Tasks.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Threading.Tasks.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Threading.Timer, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Threading.Timer.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Threading.Timer.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.ComponentModel.EventBasedAsync, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ComponentModel.EventBasedAsync.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.ComponentModel.EventBasedAsync.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Net.NetworkInformation, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Net.NetworkInformation.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Net.NetworkInformation.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Runtime.InteropServices, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.20.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.InteropServices.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.InteropServices.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Linq.Queryable, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Linq.Queryable.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Linq.Queryable.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.20.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Resources.ResourceManager, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Resources.ResourceManager.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Resources.ResourceManager.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Diagnostics.Debug, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Diagnostics.Debug.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Diagnostics.Debug.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.IO, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.IO.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.IO.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Xml.ReaderWriter, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Xml.ReaderWriter.dll] to Version "4.1.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Xml.ReaderWriter.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Collections, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Collections.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Collections.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Net.Sockets, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Net.Sockets.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Reflection, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Reflection.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Net.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Net.Primitives.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Net.Primitives.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Runtime.InteropServices.RuntimeInformation, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.0.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.InteropServices.RuntimeInformation.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Security.SecureString, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Security.SecureString.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Text.RegularExpressions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Text.RegularExpressions.dll] to Version "4.1.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Text.RegularExpressions.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Globalization, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Globalization.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Globalization.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Text.Encoding, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Text.Encoding.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Text.Encoding.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Text.Encoding.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Text.Encoding.Extensions.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Text.Encoding.Extensions.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Threading.Overlapped, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Threading.Overlapped.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Threading, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Threading.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Threading.dll] to solve conflict and get rid of warning.
3>  Consider app.config remapping of assembly "System.Reflection.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Extensions.dll] to Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Reflection.Extensions.dll] to solve conflict and get rid of warning.
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1987,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.


@ErikEJ ErikEJ closed this as completed Aug 21, 2017
@horseyhorsey
Copy link

I ran into similar issue. After creating the 4th or 5th project I could solve it, but not by explictly setting a reference to ValueTuple.

On the daily builds following the wiki guide it was just a case of:

  • Creating a project 4.61
  • Use the Nuget.config, or add manually to sources.
  • Selecting the relevant source from PM console before using install-package.
  • Making sure all projects in solution would build or remove/unload them if not.
  • Set it as startup project when you're trying a command like add-migration

Simple steps, but the ambigious tuple error must be from other nuget packages under same name.?

@scaltagi
Copy link

scaltagi commented Jan 2, 2018

I'm seeing the same issue: a System.IO.FileLoadException on System.ValueTuple
Nuget System.ValueTuple 4.4.0 installed
VS 2017 15.5.2
net461

Did not resolve with Auto Bindings Redirects
Did not resolve with manual assembly binding redirect

@ErikEJ
Copy link
Owner Author

ErikEJ commented Jan 2, 2018

Please post a new issue with a repro project

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants