8

So I'm running this command

- task: DotNetCoreCLI@2
  displayName: 'dotnet publish'
  inputs:
    command: 'publish'
    publishWebProjects: false
    projects: 'src/myproj/*.csproj'
    arguments: -o $(build.artifactStagingDirectory)

And it is generating as Published Artifacts in a drop folder (Yes!), but as a zip file (myproj.zip).

I want to avoid the zip and would rather want the output as a full folder.

I'm researching but I cant find where this is being done.

The funny thing is that I tried it on my own CMD window and it is outputing the folder, but in Azure Pipelines it is generating a zip file.

Kat Lim Ruiz
  • 2,425
  • 2
  • 26
  • 32

1 Answers1

11

Please try the zipAfterPublish property (see also this page), optional in combination with the modifyOutputPath property.

This would result in the following yaml snippet:

- task: DotNetCoreCLI@2
  displayName: 'dotnet publish'
  inputs:
    command: 'publish'
    publishWebProjects: false
    projects: 'src/myproj/*.csproj'
    arguments: -o $(build.artifactStagingDirectory)
    zipAfterPublish: false
    modifyOutputPath: false
Herman Cordes
  • 4,628
  • 9
  • 51
  • 87