I am having issues running the NCrunch Tool to build/run tests vs2017 .net core projects. Just running the tests in vs2017 everything is fine. But when I try to run it in a build environment it errors out. There was a resolution for a similar error in v3.6 but I have 3.7. Here are the details.
C:\Tools\NCrunchConsoleTool-new>ncrunch E:\Build\A1\work\202d6ccafe264bc4\src\dmi.checkbee.sln
NCrunch Console Tool v3.7.0.7
Copyright c 2010-2016 Remco Software Ltd
Usage of this tool is permitted only under the terms described in License.rtf
This product is licensed to xxxxxxxx
[09:29:06.7042-?-1] Initialising UI Services
[09:29:06.7702-?-1] NCrunch Services Initialised
[09:29:06.8372-?-1] Publishing Event: [EngineModeSwitchedInUIEvent:Run all tests automatically [Global]]
[09:29:06.8382-?-1] Event [EngineModeSwitchedInUIEvent:Run all tests automatically [Global]] is being published on thread CoreThread to subscriber: ClientSettingsBlock.
[09:29:06.8432-?-1] Publishing Event: [EngineModesChangedEvent]
[09:29:06.8482-Core-5] Event [EngineModeSwitchedInUIEvent:Run all tests automatically [Global]] is being processed on Core thread with subscriber: ClientSettingsBlock.
[09:29:07.4213-Core-8] Loading NCrunch modules
[09:29:07.4283-Core-8] Loading module: C:\Tools\NCrunchConsoleTool-new\Modules\Gallio\nCrunch.Module.Gallio.crunchmodule
[09:29:07.4393-Core-8] Loading module: C:\Tools\NCrunchConsoleTool-new\Modules\MSpec\nCrunch.Module.MSpec.crunchmodule
[09:29:07.4423-Core-8] Loading module: C:\Tools\NCrunchConsoleTool-new\Modules\MSTest\nCrunch.Module.MSTest.crunchmodule
[09:29:07.4453-Core-8] Loading module: C:\Tools\NCrunchConsoleTool-new\Modules\NUnit\nCrunch.Module.NUnit.crunchmodule
[09:29:07.4493-Core-8] Loading module: C:\Tools\NCrunchConsoleTool-new\Modules\NUnit3\nCrunch.Module.NUnit3.crunchmodule
[09:29:07.4563-Core-8] Loading module: C:\Tools\NCrunchConsoleTool-new\Modules\XUnit2\nCrunch.Module.XUnit2.crunchmodule
[09:29:09.6295-Core-8] Framework description manager has loaded data for 6 test frameworks
[09:29:09.7045-InitialisationQueueTask-17] Auto restoring NuGet packages for 'E:\Build\A1\work\202d6ccafe264bc4\src\DMI.CheckBee\DMI.CheckBee.csproj'
[09:29:09.9395-InitialisationQueueTask-17] Loading project: E:\Build\A1\work\202d6ccafe264bc4\src\DMI.CheckBee\DMI.CheckBee.csproj
[09:29:11.6737-InitialisationQueueTask-17] ERROR (Load): Error occurred during load of component at E:\Build\A1\work\202d6ccafe264bc4\src\DMI.CheckBee\DMI.CheckBee.csproj: 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)
[09:29:11.6897-InitialisationQueueTask-18] Auto restoring NuGet packages for 'E:\Build\A1\work\202d6ccafe264bc4\src\DMI.CheckBee.Tests\DMI.CheckBee.Tests.csproj'
[09:29:11.9057-InitialisationQueueTask-18] Loading project: E:\Build\A1\work\202d6ccafe264bc4\src\DMI.CheckBee.Tests\DMI.CheckBee.Tests.csproj
[09:29:11.9687-InitialisationQueueTask-18] ERROR (Load): Error occurred during load of component at E:\Build\A1\work\202d6ccafe264bc4\src\DMI.CheckBee.Tests\DMI.CheckBee.Tests.csproj: 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)
[09:29:12.0047-Core-8] All projects have been loaded
[09:29:12.5252-?-1] Reporting engine execution results
[09:29:12.7562-?-1] Shutting down engine
[09:29:14.4611-?-1] Returning result: BuildFailure