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

Notification

Icon
Error

Last build successful, rebuilding (forever)
nkcraddock
#1 Posted : Thursday, October 4, 2012 3:06:36 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/4/2012(UTC)
Posts: 4

Thanks: 1 times
I set up NCrunch on my project and it queued up all my projects to build and it's stuck on the first one.

It just rebuilds it over and over without ever moving on. There are no errors displayed.

The project is my domain entities project and only depends on Iesi.Collections and a couple of Framework assemblies.
Remco
#2 Posted : Thursday, October 4, 2012 8:10:33 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for posting!

Usually this problem is caused by absolute file path references that reach out from NCrunch's workspace and manipulate files that exist in your original solution directory.

Make sure you don't have any build steps or tests that access files using absolute file paths. In order for NCrunch to isolate components for testing, all files must be accessed using relative references so that they can be safely included in the workspace. Otherwise, the act of NCrunch building your project or running your tests will result in changes to your original solution, which in turn causes NCrunch to detect those changes, and run everything again (because it's different).


Cheers,

Remco
nkcraddock
#3 Posted : Friday, October 5, 2012 2:13:22 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/4/2012(UTC)
Posts: 4

Thanks: 1 times
Thanks! This is what I suspected. I inherited this project recently and have looked through all the project configuration and can't find anything that looks like it would be triggering this, but I appreciate your confirmation that this is the likely culprit. I'll push forth.
nkcraddock
#4 Posted : Friday, October 5, 2012 2:33:49 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/4/2012(UTC)
Posts: 4

Thanks: 1 times
So I watched in procmon and each build did do a SetBasicInformationFile on the nuget packages.config file with:

CreationTime: 0
LastAccessTime: 0
LastWriteTime: 0
ChangeTime: 0
FileAttributes: N

Do you think this would trigger NCrunch to build? I can't seem to get it to stop doing that. I disabled auto-check for updates and all that.
Remco
#5 Posted : Friday, October 5, 2012 10:37:50 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
If the nuget.packages.config file is the culprit, I think the key issue here would be trying to identify why the SetBasicInformationFile is being performed against the nuget.packages.config file in your foreground solution directory instead of in the NCrunch workspace.

Make sure than when you're monitoring the build in procmon, you monitor the NCrunch build and not the Visual Studio build (sorry if you're already doing this, I just thought I'd point it out to be safe).

There are a couple of tricks that can often be used to find absolute references:

1. Try renaming your solution directory (i.e. put it somewhere else. If there is an absolute self-reference anywhere pointing to it, something will blow up with an error during your normal non-NCrunch build/test run when you do this)
2. Set all your source files to read only (avoiding any files that are output from your build). In theory, this should cause something to blow up if it tries to alter your source files as part of the build (which is bad practice anyway). This is probably harder to get right than option 1.
1 user thanked Remco for this useful post.
nkcraddock on 10/8/2012(UTC)
nkcraddock
#6 Posted : Monday, October 8, 2012 3:38:12 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/4/2012(UTC)
Posts: 4

Thanks: 1 times
I did some more hunting with procmon and noticed this event over and over as well:

10:20:02.9745792 AM nCrunch.BuildHost.x86.exe 6972 IRP_MJ_CREATE \\ourdomain.net\users\Users-N\NCraddock Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a File System NAME INVALID


I never get an error or anything, but it's confusing because that path shouldn't be figuring in to anything. Nothing is on that path and nothing references anything on that path.

Remco
#7 Posted : Monday, October 8, 2012 8:49:01 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Although I'd say that accessing a file in this location is probably undesirable (and is something you should look at), I don't think that this is directly related to the recursive build issue you've described. In order for NCrunch to keep rebuilding the same project, it must be referencing your original location on disk (which I presume isn't on a shared network drive?).

Would you be able to push through a bug report while NCrunch is doing its crazy building? I may be able to tell from the log file which file is triggering the change.
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.045 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download