SQLite Error 14: ‘unable to open database file’ with EF Core code first

i think the issue is that the EntityFramework Core can’t create folders by itself while using SQLite provider. Don’t know if the issue also appears when using other filebased database providers.

i had the same issue:
my datasource was something like:
optionsBuilder.UseSqlite(@”Data Source=c:\foo_db\bar_db.db”);

after i created the “foo_db” folder inside the c:\ drive, the problem was solved and EF Core created the .db file inside the folder.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)