fsprojects / fsprojects/Paket

"paket restore" fails if a dotnet project is open in Visual Studio

Open
#2,987 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extern sdk: dotnet/sdk
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

paket.exe restore fails if a .NET Core / .NET Standard project is open in Visual Studio 2017.

Repro steps
  1. Create a .NET Core or .NET Standard project.
  2. Manually import Paket.Restore.targets
  3. Set up paket.dependencies and paket.lock
  4. From a command prompt, run paket.exe restore
  5. Open the project in Visual Studio
  6. From a command prompt, run paket.exe restore again
Expected behavior

Package restore process succeeds.

Actual behavior
Checking Paket version (version 5.130.6 requested)...
Paket.exe 5.130.6 is up to date.
Paket version 5.130.6
Performance:
 - Runtime: 1 second

Paket failed with
-> UnauthorizedAccessException: Access to the path 'C:\Path\To\Project\obj\Project.csproj.paket.references.cached' is denied.
Known workarounds

Close Visual Studio before running paket restore

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the five-step scenario with a .NET Core or .NET Standard project while Visual Studio is open, focusing on the denied obj\Project.csproj.paket.references.cached path. Trace the restore operation that accesses this cache file and compare behavior with Visual Studio closed. Done means paket.exe restore succeeds while the project remains open.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.