NuGet.exe pack gives access to the path is denied

前端 未结 9 1373
生来不讨喜
生来不讨喜 2021-01-07 15:56

When I try to pack my MVC project (NuGet.exe pack) I get:

NuGet.exe : Access to the path \'...\' is denied.

This happens to be

9条回答
  •  情书的邮戳
    2021-01-07 16:37

    I ran into this with nuget restore after doing a git clean -fd with VisualStudio open: the packages/ directory was marked for deletion, and while several files were deleted, the packages/ folder itself was not as VisualStudio had the .nupkg files open.

    Once I closed VisualStudio and re-ran git clean, it removed the packages/ directory and then nuget was able to restore everthing correctly.

提交回复
热议问题