Build/Test Issues

Project failing to build via NCrunch

Started by rpotter on 5,634 views

So, I have a project failing to build in NCrunch despite the same project building fine via Visual Studio and the command line.

The root cause seems to be this (included one sample. All of the project references are generating this warning):

"WARNING - C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets: The primary reference "C:\Users\rpotter\AppData\Local\NCrunch\3008\10\Pipeworks\Utility\bin\Debug\Pipeworks.Utility.dll" could not be resolved because it has an indirect dependency on the assembly "Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" which was built against the ".NETFramework,Version=v4.0,Profile=Client" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v3.5"."

The referenced project is set to build under 3.5 and all of it's referenced are built with 3.5. The project failing to build is *also* building under 3.5. But I guess NCrunch is building the Utility project in 4.0? That seems strange.
Ok, so it seems to have been grabbing the wrong version of the referenced assemblies. By configuring it to copy the references on build, it fixed the issue.

Post a reply

Log in to reply.