-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed as not planned
Labels
Description
Passing Data Source=MyDatabase.db
does not work anymore when calling DbContextOptionsBuilder.UseSqlite(string)
.
The exception thrown is :
An error occurred using the connection to database 'main' on server 'MyDatabase.db'.
Exception thrown: 'Microsoft.Data.Sqlite.SqliteException' in System.Private.CoreLib.dll
SQLite Error 14: 'unable to open database file'.
Previously, it put the specified database into the LocalState
folder.
This has also been reported here, but the solution does not satisfy me as I code to get the current package LocalState
folder.
Steps to reproduce
Create a basic UWP app with a DbContext
and use the method UseSqlite("Data Source=MyDatabase.db")
. Then try creating the database or use the Database.MigrateAsync
method.
Further technical details
EF Core version: 3.1.0
Database provider: Microsoft.EntityFrameworkCore.Sqlite
Target framework: UWP
Operating system: Windows 10
IDE: Visual Studio 2019 16.4