Hello first time Ncrunch user here. I am attempting to use Ncrunch with VS2017 and windows 10. I am seeing this error when my test project is set to netcore 2.0.
An error occurred while analysing this project after it was built: NCrunch encountered an unexpected error occurred while building an environment to analyse an assembly: nCrunch.TaskRunner.Ipc.IpcConnectionClosedException: The connection has been closed
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(ProcessorArchitecture , ProcessLoadParameters )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.LoadExternalProcess(ProcessLoadParameters parameters, GridClientId client)
at nCrunch.Core.TestManagement.TestRunnerProcess..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.TestManagement.TestRunnerProcess.(Nullable`1 , FilePath , GridClientId , CustomEnvironmentVariable[] )
at nCrunch.Core.TestManagement.TestRunnerProcess..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.Processing.AnalysisTaskLogic.DoProcessTaskAndReturnSuccessFlag()
If I change the test project to instead target netcore 1.0 the problem goes away as far as Ncrunch is concerned, but the issue becomes referencing a 2.0 project from a 1.0 version. Any suggestions?
Remco NCrunch Developer
#11351
10 Oct 2017 22:40 UTC
Hi, thanks for sharing this problem and for sending through your bug report.
This is happening because NCrunch's .NET Core process is failing to initialise. The process explodes before any of the error handling can be established, so we don't know why its failed.
Do you see this for all your .NET Core 2.0 test projects? What happens if you create a new one with a blank template?
Something to try is running dotnet.exe against the NCrunch task runner DLL as it exists in your NCrunch workspace. This might give a more informative error. Try the following:
1. Run NCrunch so that it fails/explodes
2. On the project involved, right click on this in the NCrunch Tests Window, go to Advanced->Browse to workspace
3. Find the bin\debug directory or the place where your assemblies have been output from the build system, open a command prompt there
4. run "C:\Program Files\dotnet\dotnet.exe" nCrunch.TaskRunner.DotNetCore.20.x64.dll
This is happening because NCrunch's .NET Core process is failing to initialise. The process explodes before any of the error handling can be established, so we don't know why its failed.
Do you see this for all your .NET Core 2.0 test projects? What happens if you create a new one with a blank template?
Something to try is running dotnet.exe against the NCrunch task runner DLL as it exists in your NCrunch workspace. This might give a more informative error. Try the following:
1. Run NCrunch so that it fails/explodes
2. On the project involved, right click on this in the NCrunch Tests Window, go to Advanced->Browse to workspace
3. Find the bin\debug directory or the place where your assemblies have been output from the build system, open a command prompt there
4. run "C:\Program Files\dotnet\dotnet.exe" nCrunch.TaskRunner.DotNetCore.20.x64.dll
I'm not exactly sure why or how it got fixed, but when I changed the test project to netcoreapp1.0 then back to 2.0 and clean/rebuild, all is now working. I haven't seen the issue since!
Remco NCrunch Developer
#11353
10 Oct 2017 22:46 UTC
mjnorman wrote:I'm not exactly sure why or how it got fixed, but when I changed the test project to netcoreapp1.0 then back to 2.0 and clean/rebuild, all is now working. I haven't seen the issue since!
Thanks for confirming it's solved. It may have been something internal in .NET Core itself, or perhaps a transient desync issue. If it does happen again, I'd be interested to know if the above steps give you any useful information.
Btw. NCrunch 3.12 survived the Upgrade to .NET Core SDK 2.1.2 ;) (and several previews of that)
Remco NCrunch Developer
#11630
11 Dec 2017 21:22 UTC
Der-Albert.com wrote:Btw. NCrunch 3.12 survived the Upgrade to .NET Core SDK 2.1.2 ;) (and several previews of that)
Good!!! Maybe we're getting more future proof here :)
Post a reply
Log in to reply.