Sitelet https://github.com/fsprojects/Paket/issues/858
Skip to content

Paket restore fails randomly when "msbuilding" solution in parallel #858

Description

@dzendras

There seems to be a problem with paket restore when using msbuild/p:BuildInParallel=true switch.
It happens on our build machine randomly, but frequently (every day):

C:\SolutionDir.paket\paket.targets(36,5): error MSB3073: The command ""C:\SolutionDir.paket\paket.exe" restore --references-files "C:\SolutionDir\FooProject\paket.references" " exited with code 1. [C:\SolutionDir\FooProject\FooProject.csproj]

When using paket restore with --log-file (BTW why isn't it available on the paket's commands list displayed when you run paket without any arguments?) I could see the cause of the failures:

packages folder is locked by paket.exe (PID = 4220). Waiting...

Paket failed with:
The process cannot access the file 'C:\SolutionDir\packages\paket.locked' because it is being used by another process.

The workaround is to run paket restore before running msbuild.
Is it possible to make paket support such a scenario out of the box?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions