question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clearing cache corrupts paket tool

See original GitHub issue

Description

Running dotnet paket clear-cache command causes paket to become corrupt and unusable

Repro steps

  1. Install paket locally in an application using dotnet core dotnet new tool-manifest, dotnet tool install paket, dotnet tool restore
  2. Run dotnet paket clear-cache:
C:\repos\MyApp> dotnet paket clear-cache
Paket version 5.247.4
  - C:\Users\vitor\.nuget\packages
Performance:
 - Runtime: 1 second
Paket failed with
-> UnauthorizedAccessException: Access to the path 'C:\Users\vitor\.nuget\packages\paket\5.247.4\tools\netcoreapp2.1\any\Argu.dll' is denied.
  1. Paket carshes and becomes corrupt:
C:\repos\MyApp>dotnet paket --version
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Users\vitor\.nuget\packages\paket\5.247.4\tools\netcoreapp2.1\any\'.
Failed to run as a self-contained app. If this should be a framework-dependent app, add the C:\Users\vitor\.nuget\packages\paket\5.247.4\tools\netcoreapp2.1\any\paket.runtimeconfig.json file specifying the appropriate framework.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ChrSteinertcommented, Jul 6, 2020

I’d say the clear-cache should

  • be more robust against undeletable files, and
  • show a warning, that paket local tools might be deleted.

Opinions, @forki ?

0reactions
ChrSteinertcommented, Jul 6, 2020

The current cache-clear just tries to delete every file in the common nuget cache folders recursively. I can use some better erorr handling though 😉 (And a warning cannot hurt as well)

Read more comments on GitHub >

github_iconTop Results From Across the Web

paket clear-cache
Clear the global and optionally local NuGet and cache directories. ... If you add the --verbose flag Paket will run in verbose mode...
Read more >
How can I clear the NuGet package cache using ...
First, download the NuGet command line tool from here. Next, open a command prompt and cd to the directory to which nuget.exe was...
Read more >
How to clear app cache on Android & why you should
Clearing cache may not be advisable for all purposes, but sometimes it's just what your phone needs to work properly again.
Read more >
How to Clear Cache on Android (And When You Should)
In most cases, clearing the cache from a few problematic apps can resolve storage or performance issues. Follow these steps to clear cached...
Read more >
How to Clean YUM Cache {4 Options Explained}
Learn how to clean YUM cache and prevent metadata errors. Read this guide for different ways to clear YUM cache and free up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found