Skip to content

[BUG]: DotNetCoreCLI@2 publish removes the produced ZIP file and leaves the ZIP source files in place #20974

Open
@kosa-gyula-77

Description

@kosa-gyula-77

New issue checklist

Task name

DotNetCoreCLI

Task version

2.247.3

Issue Description

DotNetCoreCLI@2 zipAfterPublish set to true confuses things: it removes the produced ZIP file and leaves the ZIP source files in place.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

windows-latest

Relevant log output

C:\Program Files\dotnet\dotnet.exe" publish D:\a\1\s\app\Service.csproj --configuration Release --no-restore --no-build --output D:\a\1\a\app_service
...
##[debug]Zip Source: D:\a\1\a\app_service
##[debug]Zip arguments: Source: D:\a\1\a\app_service , target: D:\a\1\a\app_service.zip
##[debug]Successfully created archive D:\a\1\a\app_service.zip
##[debug]rm -rf D:\a\1\a\app_service
##[debug]removing directory D:\a\1\a\app_service

Subsequent task:
ls D:\a\1\a
========================== Starting Command Output ===========================
app_service

Full task logs with system.debug enabled

No response

Repro steps

- task: DotNetCoreCLI@2
  displayName: Publish (dotnet)
  inputs:
    command: 'publish'
    modifyOutputPath: false
    zipAfterPublish: true
    publishWebProjects: false
    arguments: '--configuration Release --no-restore --no-build --output $(Build.ArtifactStagingDirectory)/app_service'
    projects: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions