I'm trying to build my unit testing project to net6 but I'm getting the below error during the anlyze of the assembly, like shown in [img=https://imgur.com/a/TZto6VA]this image[/img].
[PID:5888 15:54:56.8391 NodeProcessor-494] ERROR (Internal): nCrunch.TaskRunner.Ipc.IpcConnectionClosedException: The NCrunch task process was unexpectedly terminated. For information on how to troubleshoot this problem, please see https://www.ncrunch.net/documentation/troubleshooting_process-terminated-unexpected-error
at nCrunch.TaskRunner.Ipc.Fast.IpcReader.Initialise()
at nCrunch.TaskRunner.Ipc.Fast.IpcStream.Connect(String ipcName, Boolean isHost)
at nCrunch.TaskRunner.Ipc.Fast.FastIpcClient.Connect(String ipcName)
at nCrunch.Core.ProcessManagement.DefaultProcessLoader.ConnectToProcess(ExternalProcess externalProcess, ProcessLoadParameters parameters, Action`1 outOfBandMessageHandler)
at nCrunch.Core.ProcessManagement.ExternalProcessManager..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters , Boolean )
[PID:5888 15:54:57.4021 NodeProcessor-494] ERROR (Internal): nCrunch.TaskRunner.Ipc.IpcConnectionClosedException: The NCrunch task process was unexpectedly terminated. For information on how to troubleshoot this problem, please see https://www.ncrunch.net/documentation/troubleshooting_process-terminated-unexpected-error
at nCrunch.TaskRunner.Ipc.Fast.IpcReader.Initialise()
at nCrunch.TaskRunner.Ipc.Fast.IpcStream.Connect(String ipcName, Boolean isHost)
at nCrunch.TaskRunner.Ipc.Fast.FastIpcClient.Connect(String ipcName)
at nCrunch.Core.ProcessManagement.DefaultProcessLoader.ConnectToProcess(ExternalProcess externalProcess, ProcessLoadParameters parameters, Action`1 outOfBandMessageHandler)
at nCrunch.Core.ProcessManagement.ExternalProcessManager..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters , Boolean )
The same project builts against net472 works fine.
Usually, this is caused by critical assembly resolution issues in the analysis environment. Would you be able to submit a bug report after you've had this happen to you? Usually the report will contain more detail about the problem.
Unfortunately, the report didn't include any detail about the error. Taking another look at the message, this actually makes sense, since it would have occurred on your grid node.
I strongly suspect this issue is caused by an SDK missing on the node. Can you compare the dotnet SDKs on your client machine with those on the node? Usually these are stored in C:\Program Files\dotnet\sdk. It's important for the proper functioning of the node that it has the same SDKs installed on it as are on your client machine.
I do also recommend upgrading to the newer NCrunch (v4.17) as we've fixed a few problems in this new build.
I've just shared another bug report after upgrading to v4.17.0.7. The error is still there. Now I'm going to check SDK version installed on the machines...
After updating SDK on the NCrunch grid machines, the error disappeared.
It's not so easy to keep SDK versions synched because in developers' machines, it's updated with Visual Studio updates... I hope you understand this, but I'm not sure you can do something about this, is that so?
Marcello wrote:
It's not so easy to keep SDK versions synched because in developers' machines, it's updated with Visual Studio updates... I hope you understand this, but I'm not sure you can do something about this, is that so?
Sadly, there isn't much we can do to automatically solve SDK deployment inconsistencies. We can't safely automatically install SDK updates on grid nodes, and the SDKs need to be consistent for anything to work.
We should, however, be giving a much clearer error message on this. I'll make a task to take another look at SDK inconsistency errors. We do quite a bit of reporting of SDK inconsistencies, but somehow this error slipped through the cracks.
Unfortunately, you'll always need to upgrade your grid node every time you update your local VS.