Often when I update NuGet packages for a solution, I find that the previous version of the packages cannot be deleted from the packages folder without a restart of visual studio.
I used Sysinternals Process Explorer to look for open handles within the packages folder of the solution and found that the NCrunch EngineHost process contains open handles to these folders.
Is this normal behaviour?
Daily Usage Issues
NCrunch holds open handles to nuget package folders
Started by Tim__ on 6,145 views
Remco NCrunch Developer
#8470
22 Mar 2016 23:02 UTC
Hi Tim,
Yes, sadly, this is normal behaviour. NCrunch needs to watch the directories of all dependencies to pick up on file system changes .. and this has a side-effect of locking them at root.
Best practice is to always disable NCrunch when performing Nuget updates. This is because the way in which Nuget updates project files and references can cause consistency issues that make the engine desync from the foreground solution. If the engine is disabled, the packages directory will unlocked.
Yes, sadly, this is normal behaviour. NCrunch needs to watch the directories of all dependencies to pick up on file system changes .. and this has a side-effect of locking them at root.
Best practice is to always disable NCrunch when performing Nuget updates. This is because the way in which Nuget updates project files and references can cause consistency issues that make the engine desync from the foreground solution. If the engine is disabled, the packages directory will unlocked.
Thanks for the information Remco, I will disable NCrunch from now on before performing updates.
Post a reply
Log in to reply.