I'm building a pipeline for the Asp.Net Core project in Azure DevOps. I'm not able to generate a migration script during build stage. It's failing with an error
"Value cannot be null. (Parameter 'connectionString')"
We didn't add appsettings.json file into the project to avoid conflicts between local environments (I believe that in general it's not required).
I used this code:
- task: DotNetCoreCLI@2
displayName: 'Generate SQL Script'
inputs:
command: 'custom'
custom: 'ef'
arguments: 'migrations script --idempotent --project $(Build.SourcesDirectory)\Project\Project.csproj --output $(Build.ArtifactStagingDirectory)/migration.sql'
workingDirectory: '$(Build.SourcesDirectory)/Project'
and expected to get migration.sql file