My project is an AspNet Core 2.2 Api, I am building it in Azure Pipelines (classic) I want to generate the swagger document during an azure pipeline build - for this I am using Swashbuckle.AspNetCore.Cli and the documents in Retrieve Swagger Directly from a Startup Assembly
- I have a Use .NET Core task set to 2.2 at the beginning of the job
- I have installed the tools using .NET Core task with custom tool command with arguments
install swashbuckle.aspnetcore.cli --version 5.0.0-rc4 --global
, this seemed to work; If I run this task again it fails with message that tool is already installed. Then in my CI Build, I added a .NET Core task with settings
- command to Custom
- Path to Project(s) to the path csproj file
- Custom command to
swagger
- Arguments to
tofile --output $(Build.ArtifactStagingDirectory)/swagger.json $($(Build.ArtifactStagingDirectory)_Dxxxxx.Api.dll v1
I'm getting this error No executable found matching command "dotnet-swagger"