Dopo aver tentato di cambiare il mio progetto esistente dalla versione beta 8 alla versione 1, ho ottenuto quanto segue dopo aver eseguito le 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'.
Il mio file project.json
contiene insieme ad altri quanto segue
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc1-final",
"EntityFramework.SQLite": "7.0.0-rc1-final"
},
"commands": {
"ef": "EntityFramework.Commands"
},
Cosa devo fare per risolvere questo errore?
I nomi dei pacchetti fanno distinzione tra maiuscole e minuscole in Linux e OS X a causa del file system sensibile al maiuscolo / minuscolo. Assicurarsi di utilizzare EntityFramework.Sqlite
non EntityFramework.SQLite
nel file project.json . (Vedi GitHub Issue dotnet / cli # 236 )