2016-01-06 49 views
0

我們有一個構建服務器,可以在git中籤入時自動增加解決方案的版本號。但是,由於_MigrationHistory表中編碼的「模型」列,這導致C#EntityFramework和代碼優先遷移出現問題。它在運行Add-Migration命令時將程序集的版本存儲在我的項目中。EntityFramework和自動增量解決方案版本號

所以我的問題是運行「添加遷移」命令,版本1.x獲取存儲在生成的遷移文件。一旦代碼被檢查在自動遞增構建服務器存儲文件在版本2.x - 導致版本不匹配:

Schema specified is not valid. Errors: 
(0,0) : error 0004: Could not load file or assembly 'MyAssembly, 
Version=1.0, Culture=neutral, PublicKeyToken=8555df3922cc0c82' or 
one of its dependencies. The located assembly's manifest definition does not 
match the assembly reference. (Exception from HRESULT: 0x80131040) 

有什麼建議嗎?

回答