我们的追加迁移是不正常的,但不一致.迁移总是进入脚手架步骤,然后大约4次5次,我们将收到以下内容:
System.Runtime.Remoting.RemotingException: Object '/2355037d_df43_460b_8737_725c0c1c80be/hvdculybngjc_rcnskixmk7+_2.rem' has been disconnected or does not exist at the server.at EnvDTE.Project.get_Properties() at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetPropertyValue[T] (Project project,String propertyName) at System.Data.Entity.Migrations.Extensions.ProjectExtensions.AddFile(Project project,String path,String contents) at System.Data.Entity.Migrations.Utilities.MigrationWriter.Write(ScaffoldedMigration scaffoldedMigration,Boolean rescaffolding,Boolean force,String name) at System.Data.Entity.Migrations.AddMigrationCommand.<>c__DisplayClass3.<.ctor>b__1() at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command) Object '/2355037d_df43_460b_8737_725c0c1c80be/hvdculybngjc_rcnskixmk7+_2.rem' has been disconnected or does not exist at the server.
有时,迁移类也会生成,但是更常见的是它不会生成.搜索这个错误已经表明,垃圾收集的东西是不应该的,但这并不能帮助我们解决这个问题.
我们的数据迁移项目在.NET 4.5中,EF 5在Windows 8,Visual Studio 2012和sql Server 2012中工作.