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

UWP - Relational data LINQ Queryable exception #1568

Closed
mkieres opened this issue Sep 19, 2017 · 3 comments · Fixed by #2639
Closed

UWP - Relational data LINQ Queryable exception #1568

mkieres opened this issue Sep 19, 2017 · 3 comments · Fixed by #2639
Assignees

Comments

@mkieres
Copy link

mkieres commented Sep 19, 2017

Goals

Query relational data

Expected Results

Retrieval of data

Actual Results

Exception:
"System.IO.FileLoadException: 'Could not load file or assembly 'System.Linq.Queryable..."

Code Sample

Brand new UWP project with Realm nuget packages. When debugging the app I'm getting an exception when trying to query relational data.

NOTE: Same code works fine on brand new Xamarin project (tested on UWP and Android)

UWP_Queryable_Exception.zip

Version of Realm and Tooling

  • Realm Version: 1.6.0
  • Environment: Windows 10 with VS 2017 15.3.4 Community
@nirinchev
Copy link
Member

Can you try adding the System.Linq.Queryable nuget? It should have been added as a dependency of Remotion.Linq, but it's possible NuGet has failed to do so. Additionally, you should remove the Realm NuGet from your project as that may cause issues with resolving the native library. As Sync is not yet supported for UWP, you only need the Realm.Database package.

@mkieres
Copy link
Author

mkieres commented Sep 21, 2017

Hi nirinchev,

Thanks for your reply

I tried both suggestions. I removed Realm nuget dependency and added System.Linq.Queryable nuget (tried with versions 4.3.0, 4.0.1 and 4.0.0). I also double checked if System.Linq.Queryable libraries are being copied to the bin folder - they are. Unfortunately this did not help

There's seems to be an explicit dependency on the particular System.Linq.Queryable version, as the exception that I get goes as follows "Could not load file or assembly 'System.Linq.Queryable, Version=4.0.20.0".

Any other suggestions that I could try?

Find updated version of my sample attached

UWP_Queryable_Exception_Updated.zip

@nirinchev
Copy link
Member

Thanks for taking the time to test this out! We'll try to identify the source of the problem and report back when we have more information.

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

Successfully merging a pull request may close this issue.

5 participants