We seem to have an odd intermittent issue which is causing myself and the 2 other developers in my team a great deal of pain.
Whenever we run add-migration XYZ or update-database we get this:
PM> add-migration AnJo
System.Runtime.Remoting.RemotingException: Object '/82be48a6_6513_4f36_8bd3_140a72c73c41/ajoarmfikkpfnj91phkysfun_21.rem' has been disconnected or does not exist at the server.
at System.Data.Entity.Migrations.Utilities.DomainDispatcher.WriteLine(String text)
at System.Data.Entity.Migrations.MigrationsDomainCommand.WriteLine(String message)
at System.Data.Entity.Migrations.AddMigrationCommand.Execute(String name, Boolean force, Boolean ignoreChanges)
at System.Data.Entity.Migrations.AddMigrationCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Object '/82be48a6_6513_4f36_8bd3_140a72c73c41/ajoarmfikkpfnj91phkysfun_21.rem' has been disconnected or does not exist at the server.
Now, a bit of googling suggests its because the temp object is being GC's while its trying to run, however it does this all the time. We reboot our servers, PC's clean code and delete migrations in the solution folder, and it might just work for us, but most of the time it doesn't.
In some cases, it creates the migration file in the solution ok, but then errors while running the update-database.
Its now becoming an issue and wondered if anyone had any ideas or solutions as Microsoft want an example solution to replicate it, however it's not easy to replicate outside our environment. In itself, our environment isn't special, it's VS2013 Pro, EF6.1.1, SQL 2012.