数据库配置错误。
将相对地址修改为绝对地址就可以了。
提示错误
<?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionStrings > <add name="ConnectionString" connectionString="Data Source=.\Repositories\Database.db; " providerName="Microsoft.EntityFrameworkCore.Sqlite" /> </connectionStrings> </configuration>
修改后
<?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionStrings > <add name="ConnectionString" connectionString="Data Source=D:\程序开发\观察者\LYFWPFUI\LYFWPFUI\Repositories\Database.db; " providerName="Microsoft.EntityFrameworkCore.Sqlite" /> </connectionStrings> </configuration>
就不提示错误了
标签:SqliteException,core,Sqlite,Data,SQLite,unable,file,open From: https://www.cnblogs.com/cdaniu/p/16890926.html