Я использую jincod Heroku. NET Core Buildpack для развертывания моего приложения Core 3.1 MVC на heroku.
В настоящее время я пытаюсь применить EF-миграции к postgre БД (используя Npg sql), выполнив команду на publi sh:
<Target Name="PrePublishTarget" AfterTargets="Publish">
<Exec Command="dotnet tool install --global dotnet-ef" />
<Exec Command="dotnet ef database update" />
</Target>
Сборка завершается с такими сообщениями:
You can invoke the tool using the following command: dotnet-ef
Tool 'dotnet-ef' (version '3.1.3') was successfully installed.
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-ef does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
/tmp/build_35cf57c00fbf62634ac8d644c6e8f4f7/BugTracker.csproj(38,5): error MSB3073: The command "dotnet ef database update" exited with code 1.
! Push rejected, failed to compile ASP.NET Core app.
! Push failed
Я явно устанавливаю do tnet -ef , но почему-то не может его найти?