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

EntityFramework 7 SQLite prevents packages being built when packaging Universal Apps for the Windows Store #4212

Closed tmarkovski closed 2 years ago

tmarkovski commented 8 years ago

I'm running into an issue that forced me to drop using EF7.SQLite from my project. From Visual Studio, I am not able to build a package for testing for my Universal Windows app, using the usual options Store -> Create App Packages... What happens is the build just hangs in building state forever. Just removing the references from the NuGet packags for EF7 SQLite and packages start building again. I am able to test the app by running it on the Local Machine, but I can't build package to deploy and test on my phone. I am using the prerelease version of EntityFramework.SQLite marked as rc1-final.

natemcmaster commented 8 years ago

What happens is the build just hangs in building state forever.

Compile probably terminates eventually, but it just takes much longer than you are expecting. EF7 RC1 has a very slow compile time on .NET Native (the toolchain that runs when you build an App package or run your app in "Release" mode).

Triage: Possible duplicate of https://github.com/aspnet/EntityFramework/issues/3561. Could be fixed with https://github.com/aspnet/EntityFramework/issues/3801 in rc2

tmarkovski commented 8 years ago

You're absolutely right. It took 25 minutes to finish the build. I guess I was never patient enough to wait for it. While not optimal, this will suffice for now to make me switch back to SQLite using EF7. Thank you @natemcmaster!

kobush commented 8 years ago

I run into similar issue and in my case the nutc compiler goes up to 3500MB and crashes:

2>STARTPROCESSTASK : error : Out of Memory 2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(1129,5): error : ILT0005: 'C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\Tools\nutc_driver.exe @"D:\Work\GitHub\universal-beacon\WindowsBeacons\obj\x86\Release\ilc\intermediate\MDIL\WindowsBeacons.rsp"' returned exit code 1

Probably this will work on simple project but I have some other references in my app and in total it runs out of memory. But after removing reference to EF it compiles with much less memory usage.

Without .NET Native I can't create appx boundle to deploy to Windows Store because Win Cert Kit complains that sqlite3.dll uses some unsafe interfaces.

natemcmaster commented 8 years ago

@kobush are you using nightly builds or RC1? This is a known issue in RC1 and will be fixed in RC2.

danielgary commented 8 years ago

@natemcmaster I can confirm this still occurs using 7.0.0-rc2-16649

natemcmaster commented 8 years ago

This fix was added in 16712 (https://github.com/aspnet/EntityFramework/commit/9aab7992d1825ebc903ca321d420dcb5cabb2e65)

danielgary commented 8 years ago

Is it possible to get a new nightly build up on aspvnext? I'm having alot of difficulty getting this to build properly and would really prefer to continue with EF7 instead of SQLite-Net

rowanmiller commented 8 years ago

Our nightly builds are in a very volatile state at the moment due to all the changes to move to .NET CLI. To that end, even when a new build does make it to the aspnetvnext it is unlikely to work with the publically available UWP tooling. Unfortunately, our nightly builds won't really be usable until all of our teams make their next pre-releases available.

ghost commented 8 years ago

Has there been any news about when RC2 will be released? I'm kind of in the same boat @danielgary was in back in January. We're wanting to ship an Alpha next month of our UWP app, but i'm unable to consistently build in release mode due to ILT0005 errors.

rowanmiller commented 8 years ago

@dthomasdidit - there aren't any dates for RC2 at the moment sorry, the move from DNX to .NET CLI has taken a long time for us to stabilize and we are still working thru the last issues. Dates will be shared when we have them.