EF 6 mit einem DNX-Projekt

Ich habe eine neue ASP.net 5-DNX-Klassenbibliothek, die ich für das Entity-Framework verwende. Ich muss EF 6 als Ziel festlegen, da einige Funktionen, die ich benötige, nicht in EF 7 enthalten sind.

Zunächst waren die EF-Tools (wie enable-migration) nicht da. Ich habe eine alte Klassenbibliothek hinzugefügt und EF 6 installiert, und jetzt sind die Befehle da.

Wenn ich aktivierte Migrationen ausführe, wird folgende Fehlermeldung angezeigt:

PM> Migrationen aktivieren

Ausnahme, die "SetData" mit "2" Argumenten aufruft: "Geben Sie" Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject "in Assembly" Microsoft.VisualStudio.ProjectSystem.VS.Implementation, Version = 14.1 "ein .0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a 'ist nicht als serialisierbar markiert. " Unter D: \ Projects \ Rebus \ FMS \ Code \ Current \ FMSSupport \ FMSSupport \ packages \ EntityFramework.6.1.3 \ tools \ EntityFramework.psm1: 720 char: 5 + $ domain.SetData ('startUpProject', $ startUpProject) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId: SerializationException System.NullReferenceException: Der Objektverweis wurde nicht auf eine Instanz eines Objekts festgelegt. bei System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes (Projektprojekt, Int32 shellVersion) bei System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebProject (Projektprojekt) bei System.Data.Entity.Migrations.MigrationsDomainCommand. GetFacade (String configurationTypeName, Boolean useContextWorkingDirectory) bei System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable (String contextTypeName) bei System.Data.Entity.Migrations.EnableMigrationsCommand .Entity.Migrations.MigrationsDomainCommand.Execute (Aktionsbefehl) Der Objektverweis wurde nicht auf eine Instanz eines Objekts festgelegt.

Ich habe verschiedene Optionen für die Aktivierung der Migration ausprobiert, z. B. die Angabe eines Startprojekts oder des contextTypeName.

Irgendwelche Ideen

Antworten auf die Frage(6)

Ihre Antwort auf die Frage