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

Notification

Icon
Error

often have to Disable/Enable NCrunch to fix build errors
henrywilson
#1 Posted : Tuesday, March 25, 2014 4:32:06 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/25/2014(UTC)
Posts: 3
Location: United Kingdom

Was thanked: 1 time(s) in 1 post(s)
For the most part NCrunch works brilliantly and saves me tons of time. However on relatively frequent occasions I find that something gets cached in NCrunch (normally when I'm changing Project references or editing a .csproj file in some way) which causes a build error. The only way to fix this is to Disable NCrunch and Enable it again, forcing a rebuild. Why doesn't "Rebuild component" fix these issues in the same way?
Remco
#2 Posted : Tuesday, March 25, 2014 9:55:08 PM(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)
The problem you're experiencing is likely a desynchronisation between NCrunch's in-memory model and the codebase you're working in.

It's fairly rare, but sometimes when performing many refactoring and/or search/replace actions it can show up.

The causes of desync issues are not yet understood. The appear so rarely and randomly that tracing them is almost impossible. I have a theory that they are being caused by race conditions between the manner in which VS is reporting the changes to NCrunch, and the updating of VS's internal buffers.

Usually the desync will affect one file in a project - although the build problems won't usually make it clear which file this is. The failures tend to appear around the dependencies of the affected file, rather than on the file itself. Simply making a text change to the file (i.e. adding a blank space somewhere) will resync the engine and allow it to continue without a full reset needed.
henrywilson
#3 Posted : Wednesday, March 26, 2014 9:13:14 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/25/2014(UTC)
Posts: 3
Location: United Kingdom

Was thanked: 1 time(s) in 1 post(s)
Hmm...well this happens for me fairly regularly - probably every couple of days. And it tends to be on .csproj files rather than anything else, which means that popping a space into the file isn't as easy since I'd have to unload the project and reload it.

I appreciate the randomness of it will make it very difficult to trace, but it is a bit frustrating.

I'm using VS2010, as and when we upgrade to a newer version I'll be interested to see if the problems persist as frequently.
Remco
#4 Posted : Wednesday, March 26, 2014 9:48:22 PM(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)
Sorry, I wish I could offer an immediate solution to this one ... but we do need to find a way to reliably catch it in order to kill it. Do let me know if you manage to find any pattern to the changes you make that surface it.

There are some design changes I may be able to make in the hope that they will resolve the problem in future. I'm keen to hear if it goes away or improves when you update Visual Studio.

V1 was plagued with many problems like this. Over time, they do get solved.
henrywilson
#5 Posted : Thursday, March 27, 2014 8:33:22 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/25/2014(UTC)
Posts: 3
Location: United Kingdom

Was thanked: 1 time(s) in 1 post(s)
Thanks Remco. If I establish a particular pattern I'll post back here with more details. Thanks for all your hard work on NCrunch - despite its flaws I'm a big fan of the software!
1 user thanked henrywilson for this useful post.
Remco on 3/27/2014(UTC)
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