2017-12-22 7 views
0

Ich habe mein Projekt von EntityFrameWork 6 zu EntityFrameWorkCore 2.0 migriert. aber während der Migration per Befehl dotnet ef Migrationen init hinzufügen, gibt es mir einen Fehler.EntityFramework Core

An error occurred while calling method 'BuildWebHost' on class 'Program'. Continuing without the application service provider. Error: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified. 
No DbContext was found in assembly 'Huddle.Wrapper.Admin'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic. 

kann jemand plz helfen?

+1

Hallo, haben Sie EntityFramework Baugruppe hinzugefügt als Referenz (oder noch besser, als Nugget-Paket) installieren? –

+0

@ DavidHruška Nein Ich habe EntityFrameWork-Paket nicht hinzugefügt, ich habe stattdessen EntityFrameWorkCore hinzugefügt –

Antwort

-1

Wenn Sie mit EF-Core arbeiten wollen, ich glaube, Sie sollten Paket Microsoft.EntityFrameworkCore

+1

Das OP hat angegeben, dass das EntityFrameworkCore-Paket bereits hinzugefügt wurde –

+0

Haben Sie die dbcontext-Definition bereits in der Datei Startup.cs in der ConfigureServices-Methode konfiguriert? – Dasikely

Verwandte Themen