我正嘗試在我的ASP.NET Core 1.0 Web應用程序中添加現有模型的遷移。未能在ASP.NET Core 1.0中添加遷移
當我鍵入Add-Migration
時,我得到以下結果。我使用VS 2015社區和Nuget Package Manager控制檯來執行Windows 7上的命令。之前我升級了PowerShell(從版本2.0到版本4.0)。我無法理解這個錯誤,所以如果有人可以解釋我會很感激的事情。
PM> Enable-Migrations
Enable-Migrations is obsolete. Use Add-Migration to start using Migrations.
PM> Add-Migration
cmdlet Add-Migration at command pipeline position 1
Supply values for the following parameters:
Name: InitMigration
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.
我必須安裝PowerShell 5.0版... – dimitrisdan
所以是你使用EF 6還是核心?如果解決了它,必須是6。 –