Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Packages often fail to uninstall unless NCrunch is disabled
Axima
#1 Posted : Wednesday, May 20, 2020 5:22:07 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/13/2017(UTC)
Posts: 15
Location: Australia

Thanks: 4 times
Was thanked: 3 time(s) in 3 post(s)
Possibly related to NCrunch locks DLLs

I often (almost always but not 100% of the time) find that if NCrunch is not de-activated when updating NuGet packages, even if it is completely idle, it will result in some packages not being able to be uninstalled which generates this message

Screenshot

As such I always disable NCrunch when updating packages and then re-enable it.

Is there any way to avoid this?
Remco
#2 Posted : Wednesday, May 20, 2020 6:25:13 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Presently, you should always disable NCrunch before updating your Nuget packages.

We've been trying for years to find an acceptable way to handle Nuget's package update system, but what seems at face value to be a rather simple system to handle is actually not simple at all. This has much to do with the inconsistent and asynchronous way that the updates cascade through the file system and VS structure. Given the state of affairs I have to say that it looks unlikely we'll ever be able to support Nuget package updates with the engine enabled.
Axima
#3 Posted : Wednesday, May 20, 2020 9:39:36 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/13/2017(UTC)
Posts: 15
Location: Australia

Thanks: 4 times
Was thanked: 3 time(s) in 3 post(s)
Is it possible for NCrunch to detect when a NuGet operation has started and de-activate itself, then re-activate when finished?
Remco
#4 Posted : Thursday, May 21, 2020 4:31:41 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Axima;14724 wrote:
Is it possible for NCrunch to detect when a NuGet operation has started and de-activate itself, then re-activate when finished?


We want to.

Detecting when it starts turns out to be quite simple.

Detecting the end of it is much, much harder. We haven't found an acceptable way to do this. So for now, we simply ask to make sure you disable the engine before you update packages.
1 user thanked Remco for this useful post.
Axima on 5/21/2020(UTC)
Axima
#5 Posted : Thursday, May 21, 2020 4:32:34 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/13/2017(UTC)
Posts: 15
Location: Australia

Thanks: 4 times
Was thanked: 3 time(s) in 3 post(s)
No worries, I will continue to do so.

Thanks.
NeilMacMullen
#6 Posted : Thursday, May 21, 2020 11:04:42 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 12/15/2016(UTC)
Posts: 55
Location: United Kingdom

Thanks: 29 times
Was thanked: 12 time(s) in 11 post(s)
I've also been bitten by this quite a few times and have learned to disable Ncrunch before the upgrade (though I normally only remember half way through!) I think an option for Nuget to automatically disable when detecting a nuget upgrade would be useful even if re-enabling isn't practical. Nuget can end up in quite a broken state when this occurs and I often end up fixing up csproj and packages.config files by hand.

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.037 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download