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

Notification

Icon
Error

NCrunch silently failing to build a project.
otac0n
#1 Posted : Sunday, March 11, 2012 9:55:18 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/22/2011(UTC)
Posts: 51
Location: Seattle, WA

Was thanked: 7 time(s) in 7 post(s)
We have NVrunch failing to build a project, but it does not show an error message in the test window.

Here is the (sanitized) output when I browse to the workspace and build the project with MSBuild:

Code:
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.261]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 3/11/2012 2:51:38 PM.
Project "D:\NCrunch\17700\143\Web\Members\Web.Members\Web.Members.csproj" on node 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  Web.Members -> D:\NCrunch\17700\143\Web\Members\Web.Members\bin\Web.Members.dll
NCrunchOutputFileQuery:
  #NCRUNCH_OutputFile='bin\Web.Members.dll'
Done Building Project "D:\NCrunch\17700\143\Web\Members\Web.Members\Web.Members.csproj" (default targets).


Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.35


The NCrunch output window also shows nothing when I ask NCrunch to rebuild the project.
otac0n
#2 Posted : Sunday, March 11, 2012 10:04:16 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/22/2011(UTC)
Posts: 51
Location: Seattle, WA

Was thanked: 7 time(s) in 7 post(s)
I was able to get NCrunch to be happy about the project by removing one of the project references.

This is confusing becuase that project is referenced by many other projects in our solution and NCrunch is able to build them just fine.
Remco
#3 Posted : Sunday, March 11, 2012 11:33:07 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Can you describe the symptoms of the failure in more detail? Was the failing project shown with an X in the Tests Window? Was the build failure actually correct (i.e. was it supposed to have failed)?
otac0n
#4 Posted : Monday, March 12, 2012 12:42:31 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/22/2011(UTC)
Posts: 51
Location: Seattle, WA

Was thanked: 7 time(s) in 7 post(s)
As far as I can tell, it should not have failed the build, but it was showing with an X in the tests window.

In order to try to reproduce the error, I "browsed to the last build workspace for the project" and ran MSBuild, which succeeded, as seen in my initial post.
Remco
#5 Posted : Monday, March 12, 2012 8:24:05 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Were there any details showing in the processing queue?

Often if NCrunch encounters an internal error, it will only show the details of the error in the processing queue. Most likely this had little to do with your build, and it was caused by a defect somewhere in the NCrunch engine. If you can get it to happen again, can you submit a bug report?
otac0n
#6 Posted : Tuesday, March 13, 2012 2:14:59 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/22/2011(UTC)
Posts: 51
Location: Seattle, WA

Was thanked: 7 time(s) in 7 post(s)
Here is what seems to be the root of the problem, when I turn on detailed logging:

Code:
[19:04:46.3547-BuildTask-39] ERROR (Internal): System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents)
at nCrunch.Core.BuildTask.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.ProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.ProcessingQueue.#=q_vrMx4Vpdr8SHIA907gDpw==(ProcessingTask #=qnFdWWU2KDBGY_Tb0$G9s3A==)
Remco
#7 Posted : Tuesday, March 13, 2012 8:53:35 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Gotcha. Are you able to check the build revision of NCrunch that you're using? The version of NCrunch that was initially pushed out with 1.38 (1.38.0.16) has this problem. Because of early reports and knowing that it was easy to fix, I implemented a fix and dropped a new revision out on the download page (1.38.0.17) that shouldn't be throwing this exception. If you're using the old revision, do give the new one a try and let me know if this solves the problem.
otac0n
#8 Posted : Monday, March 19, 2012 4:13:53 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/22/2011(UTC)
Posts: 51
Location: Seattle, WA

Was thanked: 7 time(s) in 7 post(s)
This fixed it, btw.
1 user thanked otac0n for this useful post.
Remco on 3/19/2012(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.044 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download