dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.79k stars 3.19k forks source link

QueryCompiler breaks on netnative #3768

Closed natemcmaster closed 8 years ago

natemcmaster commented 9 years ago

Running Release mode in the UWP getting started guide results in image

Property 'Count' was not found on type 'System.Collections.ArrayList'.

natemcmaster commented 9 years ago

@rowanmiller for RC1, users will need to add this to their AppName.rd.xml file


<Type Name="System.Collections.ArrayList" Dynamic="Required All" />
MMalikKhan commented 8 years ago

Hi I am having the same issue with the .Net Native, i have this line present in the default.rd.xml

<Type Name="System.Collections.ArrayList" Dynamic="Required All" />

could you please suggest what i am missing ? Also, this is for an UWP app

divega commented 8 years ago

@MMalikKhan are you using RC1 or RC2 bits? Most of the issues with .NET Native have been fixed for RC2 and the workarounds explained here are no longer necessary, but we require version 1.3.1 of the Universal Windows App Development Tools which are included in Visual Studio 2015 Update 2.

MMalikKhan commented 8 years ago

@divega based on the @natemcmaster reply here i updated the packages to Rc-2 but i am still have issue with the same line of code.. now its compiling but the error is at run time..

ViktorBergman commented 8 years ago

I've got the same issue here, the app is compiling but fails at runtime. UWA Development Tools version : 1.3.2 VS: 2015 Update 2 Target platform: 10586 (x86) Microsoft.EntityFrameworkCore.Sqlite: 1.0.0-rc2-final Microsoft.EntityFrameworkCore.Tools: 1.0.0-preview1-final

Default.rd.xml: < Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata"> < Application> < Assembly Name="Application" Dynamic="Required All" />

< Type Name="System.Collections.ArrayList" Dynamic="Required All" />

</ Directives>

The exception occurs as soon as I'm doing .ToListAsync() on any DbSet.

natemcmaster commented 8 years ago

Thanks @ViktorBergman. This was reported in a few places so I opened https://github.com/aspnet/EntityFramework/issues/5517 to track this.