.Net核心和Sqlite部署到azure失败
我很难使用sqlite将.net核心应用程序部署到azure。我在日志中收到的错误消息是:.Net核心和Sqlite部署到azure失败,sqlite,azure,.net-core,Sqlite,Azure,.net Core,我很难使用sqlite将.net核心应用程序部署到azure。我在日志中收到的错误消息是: fail: Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContextFactory[1] An exception occurred in the database while iterating the results of a query. Microsoft.Data.Sqlite.Sqlite
fail: Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContextFactory[1]
An exception occurred in the database while iterating the results of a query.
Microsoft.Data.Sqlite.SqliteException: SQLite Error 1: 'no such table: AspNetUserLogins'.
at Microsoft.Data.Sqlite.Interop.MarshalEx.ThrowExceptionForRC(Int32 rc, Sqlite3Handle db)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Microsoft.Data.Sqlite.SqliteCommand.<ExecuteDbDataReaderAsync>d__53.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
这在本地非常有效,但是当我部署到azure时,我会得到给定的错误。你知道哪里出了问题,我可以采取什么措施来解决吗?我有一个解决办法 作为部署的一部分,我还没有找到将迁移应用到sqlite的方法,我在这方面所做的一切都导致了错误。目前,我发现在kudu中找到.sqlite文件的位置,然后用我的本地.sqlite文件替换它是一种可以接受的解决方法
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlite(Configuration.GetConnectionString("ConnectionName")));
"ConnectionName": "Filename=./MyApp.sqlite"