title: How to create Entity Framework Migration script from Azure Build Pipe Line?
body: <p>I'm trying to create an Entity Framework Migration script from my Azure Build Pipe Line.</p>
  
  <p>I have the following two steps. The first step installs version 3.0.0 of dotnet-ef (I'm using .NET Core 3.0). The second step tries to generate the script which is failing and I can't work out why. It seems to work when the Agent Specification is set to "windows-2019" but not "ubuntu-18.04". Does anyone know why this may be the case?</p>
  
  <p><strong>STEP 1</strong></p>
  
  <pre><code>==============================================================================
  Task         : .NET Core
  Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command
  Version      : 2.158.1
  Author       : Microsoft Corporation
  Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
  ==============================================================================
  /usr/bin/dotnet tool install --global dotnet-ef --version 3.0.0
  Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.
  You can invoke the tool using the following command: dotnet-ef
  Tool 'dotnet-ef' (version '3.0.0') was successfully installed.
  Finishing: dotnet-ef tool install
  </code></pre>
  
  <p><strong>STEP 2</strong></p>
  
  <pre><code>==============================================================================
  Task         : .NET Core
  Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command
  Version      : 2.158.1
  Author       : Microsoft Corporation
  Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
  ==============================================================================
  /usr/bin/dotnet ef migrations script --idempotent --project /home/vsts/work/1/s/blah1.csproj --startup-project /home/vsts/work/1/s/blah2.csproj --output /home/vsts/work/1/a/migrations/BlahContext.sql --context BlahContext
  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.
  ##[error]Error: The process '/usr/bin/dotnet' failed with exit code 1
  ##[error]Dotnet command failed with non-zero exit code on the following projects : 
  Finishing: Generate RnhContext Migration Scripts
  </code></pre>