Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Runtime.Caching dependency in Z.Expressions.Eval prevent using in Xamarin #577

Closed
WebDucer opened this issue Jan 30, 2020 · 14 comments
Assignees

Comments

@WebDucer
Copy link

Description

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.

Further technical details

  • EF version: 3.1
  • EF Plus version: 3.0.34
  • Database Provider: SQLite
@JonathanMagnan
Copy link
Member

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 ExtensionsEntity Framework ClassicBulk OperationsDapper Plus

Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval FunctionSQL Eval Function

@JonathanMagnan JonathanMagnan self-assigned this Jan 30, 2020
@JonathanMagnan
Copy link
Member

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
Copy link
Member

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
Copy link

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
Copy link
Member

Awesome thank you ;) We will look at it.

@JonathanMagnan
Copy link
Member

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
Copy link
Author

WebDucer commented Feb 8, 2020

Thanks. I will try it on Monday and see what versions we use in Android projects.

@MartinLeist
Copy link

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
Copy link
Member

That's a very good question @MartinLeist ,

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.

I will let you know more very soon.

@JonathanMagnan
Copy link
Member

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.Caching dll.

So this issue will be fixed soon ;)

@JonathanMagnan
Copy link
Member

Hello,

A new version has been released.

For EF Core, our library should no longer have a dependency on System.Runtime.Caching.

Could you try it and let us know if that's now working?

@JonathanMagnan
Copy link
Member

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
Copy link

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
Copy link
Member

Awesome, thank you for letting us know.

Have a great day.

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

No branches or pull requests

3 participants