Entity Framework Core SQLite Connection String Keyword not supported: version

There is a thread in Github regarding the issue.

Microsoft.Data.Sqlite only supports three keywords:

  • Cache - Private or Shared
  • Data Source - The database file. Can be a URI filename.
  • Mode - ReadWriteCreate, ReadWrite, ReadOnly, or Memory.

No other keywords are supported for this namespace, however if you use the keywords you mentioned with System.Data.SQLite namespace, it will work, as they are keywords matched for System.Data.SQLite.

Your two options:

  1. Remove the Version=3 keyword or any other unsupported keyword from the connection string
  2. Change the namespace you use for your SQlite connection.

Expanding on Barr's response, the solution is to add System.Data.SQLite.Core to the project.

Then replace

var conn = Configuration.GetConnectionString("Satrimono").Replace("~", _env.ContentRootPath);
services.AddDbContext<SatrimonoContext>(options => options.UseSqlite(conn));

with

var connString = Configuration.GetConnectionString("Satrimono").Replace("~", _env.ContentRootPath);
var conn = new SQLiteConnection(connString);
services.AddDbContext<SatrimonoContext>(options => options.UseSqlite(conn));

That's it!