EF 7 Beta 8 -> EF7 RC1 - Non è più possibile creare migrazioni

asp.net-core entity-framework-core

Domanda

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

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'.

Cosa devo fare per risolvere questo errore?

Risposta popolare

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 )




Autorizzato sotto: CC-BY-SA with attribution
Non affiliato con Stack Overflow
È legale questo KB? Sì, impara il perché
Autorizzato sotto: CC-BY-SA with attribution
Non affiliato con Stack Overflow
È legale questo KB? Sì, impara il perché