我正尝试在我的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。 –