SQLite实体框架Azure应用程序sqlite3\u blob\u open没有实现

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

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'没有实现

我使用以下技术

  • EntityFrameworkCore的SQLite
  • Asp.Net核心
  • Azure web应用程序,免费服务计划
  • 通过Visual Studio 2017中的React.js模板创建的项目

它在本地工作,但当我将其部署到Azure web应用程序时,我在尝试从数据库读取数据时遇到以下错误。

在我的startup.cs中,我有以下内容

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; }
}