【发布时间】:2017-05-03 00:06:05
【问题描述】:
我最近买了一台新电脑,发现有一个新版本的 Visual Studio。 我尝试在 Nuget 管理器控制台中更新数据库,但我明白了。
包管理器控制台的 Entity Framework Core 命令尚不支持基于 csproj 的 .NET Core 项目。请改用 .NET 命令行工具(即 dotnet ef)。详情请见https://go.microsoft.com/fwlink/?linkid=834381。
然后我按照说明使用 dotnet CLI(之前从未使用过,所以不确定如何使用它)添加了工具,然后按照说明恢复了 dotnet。然后我输入 dotnet ef database update 以添加我已经拥有的迁移,但这会出现:
dotnet : 找不到匹配命令“dotnet-ef”的可执行文件
在 line:1 char:1
- dotnet ef 数据库更新
- CategoryInfo : NotSpecified: (No executable f...and "dotnet-ef" :String) [], RemoteException
- FullyQualifiedErrorId : NativeCommandError
【问题讨论】:
标签: c# entity-framework visual-studio nuget visual-studio-2017