You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
System.Runtime.Caching dependency in Z.Expressions.Eval prevent using in Xamarin #577
We use Z.EntityFramework.Plus.EFCore in our Xamarin.Forms apps. The verion 3.0.34 break the compability. As I can see, Z.Expressions.Eval adds new dependency from version 3.1.0, System.Runtime.Caching. This dependency prevent apps from build. On build we get the error below:
Can not resolve reference: `System.Runtime.Caching`, referenced by `Z.Expressions.Eval`. Please add a NuGet package or assembly reference for `System.Runtime.Caching`, or remove the reference to `Z.Expressions.Eval`.
Adding of System.Runtime.Caching NuGet package to the project doesn't help.
I'm having the same issue and created a small sample project where I could reproduce it. I get the error when trying to compile the android project. SampleIssue.zip
I'm not sure how I would get to the correct version. I'm using VS 2019 16.4.4 which should have the latest .net Core SDK included. I tried updating to the latest Xamarin.Forms version (4.4.0.991640) and downgrading the EFCore Version to 3.0.2, using .NetStandard 2.1.
Everything to no avail. I'm still getting the error. Am I missing some place where I could change a version? My Android version for compiling is 9.0, min-version 5.0 and targetversion 9.0.
No one is used with Xamarin here (just the very basic). We tried on our side and didn't find how to make it works either.
We are currently in discussion about moving all our .NET Core project to use the new Microsoft.Extensions.Caching cache (which was used previously). If this change gets accepted, we will try to do it this week.
Personally, I don't like the fact that the .NET Framework and .NET Core projects will use a different cache but we might not have the choice to eventually move to this one either.
sorry for the late answer. I did not have time to attempt the EFCore 3 update again earlier. I tried today and while I still get errors, they are not with your project. The compilation works now. I also updated my sample project to EFCore 3.1.2 and Z.EntityFramework.Plus.EFCore 3.0.39 and it now has no problem with compilation anymore.
Activity
JonathanMagnan commentedon Jan 30, 2020
Hello @WebDucer ,
Thank you for reporting, we will look at it why that's not working
Best Regards,
Jon
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);Entity Framework Extensions • Entity Framework Classic • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3C# Eval Function • SQL Eval Function
JonathanMagnan commentedon Feb 5, 2020
Hello @WebDucer ,
My developer didn't succeed to reproduce the issue.
It's possible for you to provide a small runnable project with the issue? It will be faster for us to find out why that's not working.
JonathanMagnan commentedon Feb 7, 2020
Hello @WebDucer
Since our last conversation, we haven't heard from you.
As mentioned in my previous message, is it possible for you to provide a small runnable project with the issue?
Looking forward to hearing from you,
Jon
MartinLeist commentedon Feb 7, 2020
Hello @JonathanMagnan
I'm having the same issue and created a small sample project where I could reproduce it. I get the error when trying to compile the android project.
SampleIssue.zip
thanks in advance
Martin
JonathanMagnan commentedon Feb 7, 2020
Awesome thank you ;) We will look at it.
JonathanMagnan commentedon Feb 8, 2020
Here is what my developer found so far: dotnet/runtime#28686
It seems there was indeed an issue with Xamarin.Android and the caching library.
It looks to be fixed in v3.0
Is it possible for you to upgrade to this version?
On our side, we had to do this change to make sure all framework version was using the same cache, and no 2 different caching libraries.
WebDucer commentedon Feb 8, 2020
Thanks. I will try it on Monday and see what versions we use in Android projects.
MartinLeist commentedon Feb 10, 2020
I'm not sure how I would get to the correct version. I'm using VS 2019 16.4.4 which should have the latest .net Core SDK included. I tried updating to the latest Xamarin.Forms version (4.4.0.991640) and downgrading the EFCore Version to 3.0.2, using .NetStandard 2.1.
Everything to no avail. I'm still getting the error. Am I missing some place where I could change a version? My Android version for compiling is 9.0, min-version 5.0 and targetversion 9.0.
JonathanMagnan commentedon Feb 11, 2020
That's a very good question @MartinLeist ,
No one is used with
Xamarinhere (just the very basic). We tried on our side and didn't find how to make it works either.We are currently in discussion about moving all our
.NET Coreproject to use the newMicrosoft.Extensions.Cachingcache (which was used previously). If this change gets accepted, we will try to do it this week.Personally, I don't like the fact that the
.NET Frameworkand.NET Coreprojects will use a different cache but we might not have the choice to eventually move to this one either.I will let you know more very soon.
JonathanMagnan commentedon Feb 12, 2020
Hello @WebDucer , @MartinLeist ,
Just to let you know that the final decision was to move all .NET Standard version of our library to use instead
Microsoft.Extensions.Caching.So probably at the start of next week, our library will no longer use
System.Runtime.Cachingdll.So this issue will be fixed soon ;)
JonathanMagnan commentedon Feb 17, 2020
Hello,
A new version has been released.
For
EF Core, our library should no longer have a dependency onSystem.Runtime.Caching.Could you try it and let us know if that's now working?
JonathanMagnan commentedon Feb 24, 2020
Hello,
Since our previous conversation, we haven't heard from you.
Did you get the time to try out the new version?
looking forward to hearing from you,
Jon
MartinLeist commentedon Feb 25, 2020
Hi @JonathanMagnan
sorry for the late answer. I did not have time to attempt the EFCore 3 update again earlier. I tried today and while I still get errors, they are not with your project. The compilation works now. I also updated my sample project to EFCore 3.1.2 and Z.EntityFramework.Plus.EFCore 3.0.39 and it now has no problem with compilation anymore.
Thanks.
JonathanMagnan commentedon Feb 25, 2020
Awesome, thank you for letting us know.
Have a great day.