gpt4 book ai didi

asp.net-core - EF 7 Beta 8 -> EF7 RC1 - 不再可以创建迁移

转载 作者:行者123 更新时间:2023-12-05 00:20:39 26 4
gpt4 key购买 nike

尝试将现有项目从 beta 8 更改为 RC1 后,我在运行 dnx ef migrations add Init 后得到以下信息

System.TypeLoadException: Could not load type 'Microsoft.Data.Entity.Scaffolding.SqliteDesignTimeServices, EntityFramework.Sqlite.Design'.
at Microsoft.Data.Entity.Design.Internal.DesignTimeServicesBuilder.ConfigureProviderServices (System.String provider, IServiceCollection services, Boolean throwOnError) [0x00000] in <filename unknown>:0
at Microsoft.Data.Entity.Design.Internal.DesignTimeServicesBuilder.Build (Microsoft.Data.Entity.DbContext context) [0x00000] in <filename unknown>:0
at Microsoft.Data.Entity.Design.MigrationsOperations.AddMigration (System.String name, System.String outputDir, System.String contextType) [0x00000] in <filename unknown>:0
at Microsoft.Data.Entity.Commands.Program+Executor+<>c__DisplayClass6_0.<AddMigration>b__0 () [0x00000] in <filename unknown>:0
at Microsoft.Data.Entity.Commands.Program+Executor.Execute (System.Action action) [0x00000] in <filename unknown>:0
Could not load type 'Microsoft.Data.Entity.Scaffolding.SqliteDesignTimeServices, EntityFramework.Sqlite.Design'.

我的 project.json文件与其他人一起包含以下内容
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc1-final",
"EntityFramework.SQLite": "7.0.0-rc1-final"
},
"commands": {
"ef": "EntityFramework.Commands"
},

我需要做什么来解决这个错误?

最佳答案

由于文件系统区分大小写,包名称在 Linux 和 OS X 上区分大小写。确保使用 EntityFramework.Sqlite不是 EntityFramework.SQLite在您的 project.json 文件。 (参见 GitHub 问题 dotnet/cli#236)

关于asp.net-core - EF 7 Beta 8 -> EF7 RC1 - 不再可以创建迁移,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33845962/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com