Critical issue using EF Core on UWP (unable to open database file)

entity-framework-core uwp windows-10 windows-10-mobile windows-10-universal

Question

Steps to reproduce

Follow this simple tutorial.

The issue

Start the app either in Debug or Release.

An exception occurs with db.Database.Migrate();.

Exception thrown: 'Microsoft.Data.Sqlite.SqliteException' in Microsoft.Data.Sqlite.dll. Additional information: SQLite Error 14: 'unable to open database file'.

This is the very first step, Migrate() method should create the database if there is not any yet (it also fails with db.Database.EnsureCreated()).

Further technical details

EF Core Tools version: 1.0.0-preview2-final

EF Core Sqlite version: 1.0.0

UniversalWindowsPlatform version: 5.2.2

Visual Studio version: VS 2015 Update 3

Operating system: Windows 10 10586.494

1
0
7/21/2016 8:17:51 PM

Accepted Answer

It appears that, although the first-chance exception is thrown, it doesn't actually represent a bug as EF Core handles this and continues execution normally. However, it leads to a misinterpretation (the database is created anyway).

More info

1
7/25/2016 8:30:24 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow