After some more investigation I realized my assumptions were incorrect. the versions of the entityframework package differed on the two machines. One was using EntityFramework.6.1.1-alpha1-30211
and the other EntityFramework.6.1.1-alpha1-30429
. i spotted this in the _MigrationHistory
table, I tried changing the ProductVersion field in the _MigrationHistory
table on machine2 to match its version of EntityFramework but this didn't work, so I rolled the referenced version back and it worked.
Strange behaviour however. It implies minor versions or patches of EntityFramework will require rebuilds/changes to codefirst databases?