Open vdurante opened 4 years ago
Hmm. This is unfortunate. Paket, when installed on a per-project basis, deletes itself. When it is installed as a global tool (dotnet tool install -g paket
) it does not deletes itself.
Unfortunately it cannot remove the files loaded by the executing paket itself (like Argu.exe
), but some other files get removed and then for the next execution some files are missing.
You explicity delete the nuget cache. Thus it is expected that the nuget package Paket
does not work anymore. What would be your expected behaviour?
@ChrSteinert I didn't know local tools where kept in global cache. I didn't expect installed tools to be kept in cache at all. Later I installed it globally to test it and it worked as expected. I was just trying to find a workaround for this #3116
Maybe to prevent it getting corrupt, local installations of Paket should uninstall or reinstall Paket at the end to prevent it becoming corrupt, or find some workaround, or at least show a message to explain why that is happening. Either way, that is no big deal.
Thank you!
I'd say the clear-cache
should
Opinions, @forki ?
@ChrSteinert I don't know how clear-cache
works internally on Paket, but nuget has several options for clearing cache (all | http-cache | global-packages | temp
). Maybe Paket installed locally should not clean tooling cache or something.
The issue is, that there is no dedicated tooling cache. (Non-global) Tools reside within the "normal" packages folder. This is where it gets so tricky. Alas, I'll have a look at what NuGet actually does there.
True, idk why I thought tools were installed somewhere else.
I am gonna guess NuGet (dotnet nuget
) has no issue since it is bundled within dotnet instead of being distributed as a tool. Maybe there is no solution to that unless Paket implements its own cache-clearing from scratch.
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)
Description
Running
dotnet paket clear-cache
command causes paket to become corrupt and unusableRepro steps
dotnet new tool-manifest
,dotnet tool install paket
,dotnet tool restore
dotnet paket clear-cache
: