Build/Test Issues

"1 project is failing to build" - why?

Started by jbattermann on 7,271 views

Good evening,

my solution and project worked, built & ran perfectly fine in VS as well as the test in NCrunch, but after a few referenced NuGet Packages NCrunch simply states '1 project is failing to build', but VS can clean, build/rebuild all just perfectly fine. Tests run perfectly fine in VS's TestRunner as well as in R#'s one, too.. "only" NCrunch has a problem.. and as it does not provide any information 'why', it's a but hard to find out myself.

Is there any place, log file, non-obvious window or whatnot I can look at which might reveal a bit more information?


Thanks!
-Jörg
Hi Jorg,

There have been reports of a certain failure scenario which can cause NCrunch to fail to build a project but not report this problem in the Tests Window. To date, I haven't been able to reproduce this error case .. I think there may be several variables involved.

Nonetheless, the error itself should show inside the Processing Queue window next to the build or analysis task. If it isn't there, try turning on the 'Log to output window' global configuration setting, set the 'Log verbosity' to 'Medium', then check to see if the engine dumps the error into the output window log after you reset it.

If you can let me know what the error is, hopefully this will help with my own efforts to resolve the problem with the error reporting.


Thanks!

Remco
Good morning Remco,

well it looks like this:
External image

.. but more interestingly (after enabling logging), I saw this:

[11:47:12.6242-LocalBuildTask-107] Copying project MyProject.Backend.Api resource C:\Users\joerg\AppData\Local\NCrunch\24832\8\Sources\Backend\MyProject.Backend.Api\obj\Debug\ApplicationInsights.config to C:\Users\joerg\AppData\Local\NCrunch\24832\9\Workspaces\MyProject\Development\Sources\Backend\MyProject.Backend.Api.Tests\bin\Debug\obj\Debug\ApplicationInsights.config
[11:47:12.6262-LocalBuildTask-107] ERROR (Internal): System.IO.PathTooLongException: The path 'C:\Users\joerg\AppData\Local\NCrunch\24832\9\Workspaces\MyProject\Development\Sources\Backend\MyProject.Backend.Api.Tests\bin\packages\Microsoft.Diagnostics.Instrumentation.Extensions.Intercept.0.12.0-build02810\lib\native\x86\Microsoft.ApplicationInsights.Extensions.Intercept_x86.dll' could not be processed because it exceeded the maximum allowed length of 259 characters
   at nCrunch.Common.IO.DiskPath..ctor(String absolutePath, Boolean pathIsChecked)
   at nCrunch.Common.IO.FilePath..ctor(String , Boolean )
   at nCrunch.Common.IO.FilePath.Rebase(DirectoryPath originalBase, DirectoryPath newBase)
   at nCrunch.Core.BuildManagement.BuildEnvironment.(DirectoryPath , IList`1 )
   at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, CustomEnvironmentVariable[] customEnvironmentVariables)
   at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
   at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
   at nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
   at nCrunch.Client.Processing.ProcessingQueue.(LocalProcessingTask )


Now that 3rd party NuGet package has an outrageously long name for sure, but it being an 3rd party dependency (of a dependency etc) is there a way to make this work nevertheless?

Either by manually changing NCrunch's local workspace and/or in the long run, have NCrunch support longpaths (if that's even an option beyond what you could do with e.g. (for now) p/invoking win32's native longpath support or use one of the wrappers (Microsoft (http://bcl.codeplex.com/releases/view/42783) or otherwise (http://blog.peterritchie.com/?p=2121) .. or in the future: http://referencesource.microsoft.com/#mscorlib/system/io/longpath.cs).

I've uploaded the entire log at: (- BROKEN LINK -)(- BROKEN LINK -)[/url]

Thanks,
-Jörg
Just a quick update: setting the workspace to a top-level (short) directory did in fact solve the problem!
Great, thanks! I think I can improve on how this error is being reported. Fixing it entirely probably won't be an option as NCrunch needs to run MSBuild and user code within the workspace, and I doubt that all of this code will work with the long file paths. Thanks for sharing the error details and info on how you fixed it.
Sure thing Remco, thanks for the quick support (and for NCrunch obviously)!

Cheers,
-Jörg

Post a reply

Log in to reply.