Skip to content

NuGet.Build.Tasks.Pack.targets file lock prevents .nupkg access during dotnet publish #52126

@Varorbc

Description

@Varorbc

Describe the bug

When running the following command in an Azure DevOps pipeline, we occasionally hit a file lock error.This issue is intermittent — it does not reproduce every run.

To Reproduce

dotnet publish /azp/_work/5/s/src/Test/Test.csproj -c Release -t:PublishContainer -p RuntimeIdentifiers="linux-x64;linux-arm64"

Exceptions (if any)

/azp/_work/_tool/dotnet/sdk/10.0.100/NuGet.Build.Tasks.Pack.targets(222,5): error : The process cannot access the file '/azp/_work/5/s/nugets/A.nupkg' because it is being used by another process. [/azp/_work/5/s/src/A/A.csproj]

Further technical details

details of dotnet --info

- The IDE (VS / VS Code/ VS4Mac) you're running on, and its version

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions