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

Notification

Icon
Error

Assemblies fail to load with The target "_SplitProjectReferencesByFileExistence" doesn't exist
wibarr
#1 Posted : Tuesday, April 7, 2015 5:40:07 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/7/2015(UTC)
Posts: 2
Location: United States of America

Hi everyone,

I just installed NCrunch and am running into the following error loading any of our projects:

Code:
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file: 
The target "_SplitProjectReferencesByFileExistence" does not exist in the project.
   at nCrunch.Compiler.RemoteBuildRunner.(FilePath ,   , String , String , DirectoryPath , String )
   at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(FilePath projectFilePath, BuildXml buildXml, String useBuildConfiguration, String useBuildPlatform, DirectoryPath solutionDir, String solutionName, List`1 importExpressionsToEvaluate)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.(CallMethodMessage )
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
   at nCrunch.TaskRunner.Ipc.RemoteInstance.[T](Byte[] )
   at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(FilePath projectFilePath, BuildXml buildXml, String useBuildConfiguration, String useBuildPlatform, DirectoryPath solutionDir, String solutionName, List`1 importExpressionsToEvaluate)
   at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , ProcessorArchitecture , GridClientId , IBuildableProject , CustomEnvironmentVariable[] )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(FilePath projectFilePath, BuildXml buildXml, String useBuildConfiguration, String useBuildPlatform, DirectoryPath solutionDir, String solutionName, List`1 importExpressionsToEvaluate, ProcessorArchitecture processorArchitecture, VisualStudioVersion vsVersion, CustomEnvironmentVariable[] customEnvironmentVariables)
   at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.(ProcessorArchitecture )
   at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(FilePath projectFilePath, BuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, ISnapshotConfig snapshotConfig, VisualStudioVersion vsVersion)



The solution file is dynamically generated from a subset of projects due to the overall size of the codebase and number of projects, but I've verified that when I go to the command line, I can execute msbuild /t:_SplitProjectReferencesByFileExistence on each of the projects without problems. Where is NCrunch looking for this target?

Thanks!
Remco
#2 Posted : Tuesday, April 7, 2015 9:41:37 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue.

The _SplitProjectReferencesByFileExistence target is part of the normal build target chain for most projects on the .NET platform. Usually when NCrunch's analysis build fails to find the target, this means that problem is with an include somewhere that has been missed. It's possible this is related to inconsistencies with build platform/configuration - see here for more details on this: http://www.ncrunch.net/documentation/considerations-and-constraints_project-build-platform-and-configuration[http://www.ncrunch.net/documentation/considerations-and-constraints_project-build-platform-and-configuration.

It's worth closely examining how this project file is including targets from the .NET framework. Check for conditions that might exist on the include statements. Custom-made or heavily modified projects can sometimes contain arrangements that NCrunch hasn't been tested for and the projects likely won't have been designed with NCrunch builds in mind.
wibarr
#3 Posted : Tuesday, April 7, 2015 11:52:50 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/7/2015(UTC)
Posts: 2
Location: United States of America

Hmm, I see.

Is there any way for ncrunch to emit the commands it's attempting to use to build the project or find that particular target? It's a bit obscured for me as, since it works when I use VS or the command line to build.
Remco
#4 Posted : Wednesday, April 8, 2015 12:12:54 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Try setting the 'Log Verbosity' (global config setting) to 'Detailed', and turn on the 'Log to output window' setting. NCrunch should start dumping lots of information inside the NCrunch VS output window. This should also include details from the analysis build NCrunch is running against the project.
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.033 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download