既存のプロジェクトをベータ8からRC1に変更しようとすると、 dnx ef migrations add Init
実行した後で次のようになります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ではパッケージ名で大文字と小文字が区別されます。 project.jsonファイルでEntityFramework.Sqlite
なくEntityFramework.SQLite
を使用してください。 (GitHubの問題dotnet / cli#236を参照してください)