我正在使用實體框架數據遷移。如果我更改了有關實體或其他內容的某些內容,我嘗試在程序包管理器控制檯上使用「添加遷移MyFirstMigration」。但它返回一個例外:EF Data Migrations在關閉項目後不起作用
The term 'add-migration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was inclu
ded, verify that the path is correct and try again.
At line:1 char:14
+ add-migration <<<<
+ CategoryInfo : ObjectNotFound: (add-migration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
如果我來自的NuGet卸載EntityFramework.Migrations並重新安裝它的工作有相同的代碼(「附加遷移MyFirstMigration」,「更新數據庫」),直到接近項目。
我該如何解決它?任何人遇到這種情況?
編輯:它適用於對了另一臺PC罰款...
我相信他們發佈了一個新版本的NuGet來解決這個問題。 – Betty 2012-01-16 07:42:15