I'm generating ef migration scripts in azure pipelines, for that I'm performing the following tasks:
- task: DotNetCoreCLI@2
displayName: Install EF Tool
inputs:
command: custom
custom: 'tool'
arguments: 'install --global dotnet-ef'
- task: DotNetCoreCLI@2
displayName: Create SQL Scripts
inputs:
command: custom
custom: 'ef '
nugetConfigPath: '$(Build.SourcesDirectory)/${{ parameters.nugetConfigPath }}'
arguments: 'migrations script --output $(Build.ArtifactStagingDirectory)/sql/sqlscript.sql --idempotent --project $(Build.SourcesDirectory)/${{ parameters.startupProjectPath }} --context AdministrationMigrationDBContext
For the first time when I run the pipeline, the sql script generated successfully. But the next time I'm getting the following error:
I'm getting an error while installing dotnet-ef saying "Tool dotnet-ef already installed". Can someone help me in resolving this?