尝试在包管理器控制台中使用“dotnet ef”命令。 在 PMC 中,cd 到 .csproj 目录,仍然会收到以下错误提示:
dotnet : Specify which project file to use because this 'C:\Users\PC-NAME\Source\Repos\TestProject\Test" contains more than one project file.
At line:1 char:1
dotnet ef migrations add TestMigration
+ CategoryInfo : NotSpecified: (Specify which p...e project file.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
尝试使用-p / --p并指向.csproj文件/目录 - 仍然出现相同的错误。
使用.NET CORE,MVC项目,最新的EF Core 2.0.2版本。
关于这个问题,互联网上没有太多有价值的数据,只是一种猜测,即dotnet ef命令正在寻找要运行的.exe文件。
希望得到帮助。