I am having a weird issue when trying to publish my .NET Core 3.1 Web Api. In my YAML file I have added this to publish my project:
- task: DotNetCoreCLI@2
inputs:
command: 'publish'
projects: 'BITSolutions.InvoiceTool.Service\BITSolutions.InvoiceTool.Service.csproj'
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
outputDir: '$(Build.ArtifactStagingDirectory)'
Everytime I run my build pipeline using this task, the task is executing the following line:
"C:\Program Files\dotnet\dotnet.exe" publish D:\a\1\s\BITSolutions.InvoiceTool.Web\BITSolutions.InvoiceTool.Web.csproj --configuration Release --output D:\a\1\a\BITSolutions.InvoiceTool.Web
It is publishing my Blazor Server project instead of my Service web api project as I stated in the task.
Any idea why?
Thanks in advance!
Publish web projects
in thedotnet publish
task. – Leo Liu-MSFT