-
-
Notifications
You must be signed in to change notification settings - Fork 14
System.ValueTuple issue #463
Comments
@ErikEJ Could you describe the symptoms in more details? |
@jcouv I have done some troubleshooting and provided detailed info here: dotnet/efcore#9046 |
file is present: Assembly version: 4:0:2:0, file version: 4.6.25331.2 |
Sharing fusion log: *** Assembly Binder Log Entry (03-07-2017 @ 21:29:11) *** The operation failed. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll === Pre-bind state information ===
|
Thanks for the fusion log. The next step would be to figure out which assembly has this |
Would a binding redirect unbkock me? |
Possibly. That's worth trying. |
Someone else did, and he claims it works: dotnet/efcore#9046 (comment) |
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!! :) |
@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 |
cc @ajcvickers |
@divega Thank you very much! |
Yes, thank you @divega !! |
@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
However for test projects which aren't an .exe you need to force the redirects to get generated by also setting:
While it isn't ideal the .NET Framework binding policy is pretty strict so the binding redirects are needed. |
@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?? |
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. |
Great news... I will do some testing! |
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:
The suggested solution in dotnet/efcore#9046 seems to be adding a binding redirect as such:
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:
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. |
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/ |
Still having the same issue here (net461).
|
@bubibubi Is this a SQL CE solution? Are you using VS 2017 15.3? Can you provide a repro project? |
I'm using vs 2017 15.3 (but with .net framework 4.6.1).
First try was with SQL CE but also removing it I still receive a warning
about compatibility and an error if I run the solution.
Probably is related to updates of the libraries (but I just updated them
with vs) and something wrong in System.ValueTuple package.
If I try to add the reference to the project I see an exclamation mark on
the library.
Il 20 ago 2017 8:30 PM, "Erik Ejlskov Jensen" <notifications@github.com> ha
scritto:
… Is this a SQL CE solution? Are you using VS 2017 15.3?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#463 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFmX2rnkA9jczJbp24pl2zMeLjnVX7URks5saHs8gaJpZM4OL3uE>
.
|
Can you provide a repro project? |
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. |
I could solve the issue:
I'm still receiving several compile warnings from my Console application. I should probably restart from a new csproj.
|
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:
Simple steps, but the ambigious tuple error must be from other nuget packages under same name.? |
I'm seeing the same issue: a System.IO.FileLoadException on System.ValueTuple Did not resolve with Auto Bindings Redirects |
Please post a new issue with a repro project |
Try to reference .NET standard version iso 4.6.1 version of the lib!
Also, clear packages folder and restore from Nuget.org only
The text was updated successfully, but these errors were encountered: