I have a new ASP.net 5 dnx class library that I use for entity structure. I need to configure EF 6 because some of the features I need are not included in EF 7.
At first, there were no EF tools (e.g. enable-migration). I added the old style class library and installed EF 6, and now there are commands.
When I run allowed migrations, I get this error:
PM> Enable-Migrations
Throw an exception "SetData" with argument "2": "Type 'Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject' in the assembly 'Microsoft.VisualStudio.ProjectSystem.VS.Implementation, Version = 14.1.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a 'are not marked as serializable. 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: the reference to the object is not installed in the object instance. in System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes (project project, Int32 shellVersion) under System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebProject (project project) in System.Data.Entity.Migrations.MigrationsDomainCommand. GetFacade (String configurationTypeName, Boolean useContextWorkingDirectory) with System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable (String contextTypeName) in System.Data.Entity.Migrations.EnableMigrationsCommand <. > C__DisplayClass2 <.. ctor> b__0 () in System.Data.Entity.Migrations.MigrationsDomainCommand.Execute (Action command) The object reference is not installed in the object instance.
I tried various options for enable-migration, such as indicating the start of the project or the name contextTypeName.
Any ideas?
Don chambers
source share