SQLite实体框架Azure应用程序sqlite3\u blob\u open没有实现
TLDR;从SQLite读取时出错 数据库部署到Azure webb应用程序。在本地工作很好 TypeLoadException:类型中的方法“sqlite3\u blob\u open” 来自程序集的“SQLitePCL.SQLite3Provider_e_sqlite3” 'SQLitePCLRaw.provider.e_sqlite3,版本=1.0.0.0,区域性=neutral, PublicKeyToken=9c301db686d0bd12'没有实现 我使用以下技术SQLite实体框架Azure应用程序sqlite3\u blob\u open没有实现,sqlite,asp.net-core,entity-framework-core,azure-web-app-service,Sqlite,Asp.net Core,Entity Framework Core,Azure Web App Service,TLDR;从SQLite读取时出错 数据库部署到Azure webb应用程序。在本地工作很好 TypeLoadException:类型中的方法“sqlite3\u blob\u open” 来自程序集的“SQLitePCL.SQLite3Provider_e_sqlite3” 'SQLitePCLRaw.provider.e_sqlite3,版本=1.0.0.0,区域性=neutral, PublicKeyToken=9c301db686d0bd12'没有实现 我使用以下技术 EntityFr
- EntityFrameworkCore的SQLite
- Asp.Net核心
- Azure web应用程序,免费服务计划
- 通过Visual Studio 2017中的React.js模板创建的项目
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddDbContext<AppDbContext>(options => options.UseSqlite(@"Data Source=appDatabase.db"));
}
public void配置服务(IServiceCollection服务)
{
services.AddMvc();
services.AddDbContext在添加另一个名为SQLitePCLRaw.bundle\u e\u sqlite3的nuget包后,该问题得到了修复
我发现这个线程提到了一些捆绑包,所以我搜索了nuget并找到了这个
public class AppDbContext : DbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options)
: base(options)
{ }
public DbSet<Persons> Persons { get; set; }
}