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

Notification

Icon
Error

_SplitProjectReferencesByFileExistence
ThatGuyDuncan
#1 Posted : Thursday, November 2, 2017 10:08:56 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2013(UTC)
Posts: 10
Location: Canada

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
I get this associated with three different projects in my solution. I have been cutting recently because it *appeared* that NuGet was not completely removing references in the .proj files to Microsoft.Net.Compilers, so perhaps I cut too much (but that would mean I had made a mistake, and of course *that* can't be it!).


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 , LoadTimeQuery , String , String , DirectoryPath , String , String )
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
--- 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.(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(ComponentLoadParameters parameters)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , FilePath , String , ExternalProcess )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , ProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(ProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFramework)

Remco
#2 Posted : Friday, November 3, 2017 4:34:09 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,476

Thanks: 717 times
Was thanked: 898 time(s) in 854 post(s)
Hi, thanks for posting.

Generally, when I've seen this problem, it's because MSBuild wasn't able to resolve the .targets files that were necessary to build the project. The solution to this will depend on how your build system is structured. Somewhere in the project (or in its related imports) there must be an <Import> for the standard MSBuild targets files. If you've been removing things from the project, it's possible you may have removed a critical import tag.
franckyj
#3 Posted : Wednesday, November 14, 2018 4:40:52 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/14/2018(UTC)
Posts: 1
Location: Canada

We've been bitten by this for 24 hours now and in the end it was because we installed a new version of powershell and we forgot to add the new path to the user path variable. I'm guessing ncrunch or msbuild uses powershell for some tasks and it couldn't find it. This is the explanation given to me by our sysadmins.

A telltale sign that it was this issue was that it would work when I would log in with my AD user when doing the build + ncrunch steps but it wouldn't work with the build user.

Hoping this might help other developers struggling with this issue in the future!
Remco
#4 Posted : Thursday, November 15, 2018 12:11:00 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,476

Thanks: 717 times
Was thanked: 898 time(s) in 854 post(s)
franckyj;12813 wrote:
We've been bitten by this for 24 hours now and in the end it was because we installed a new version of powershell and we forgot to add the new path to the user path variable. I'm guessing ncrunch or msbuild uses powershell for some tasks and it couldn't find it. This is the explanation given to me by our sysadmins.

A telltale sign that it was this issue was that it would work when I would log in with my AD user when doing the build + ncrunch steps but it wouldn't work with the build user.

Hoping this might help other developers struggling with this issue in the future!


Thanks for taking the time to post this here!

NCrunch relies on MSBuild's internal logic when loading projects. Usually, this problem results from MSBuild being unable to resolve the .targets files used by the project when at load time. Often the .targets files are referenced using environment variables, so I suppose it's possible that installing powershell changed a critical variable on your system. NCrunch itself has no integration with powershell, but when using MSBuild, anything becomes possible.
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.054 seconds.