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

Notification

Icon
Error

IpcConnectionClosedException after upgrade to .netcore 2.1
jonas
#1 Posted : Monday, August 6, 2018 11:16:27 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/6/2018(UTC)
Posts: 7
Location: Denmark

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hi'

I am suddenly getting an exception when trying to build my dotnet core 2.1 project. I recently upgraded to 2.1 from 2.0 but i'm not sure it is related.
I have tried to reset NCrunch and update to the latest version (currently 3.18.0.2). My VS2017 is version 15.7.6.

Code:

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 , CustomVariable[] )
   at nCrunch.Core.TestManagement.TestRunnerProcess..()
   at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   at nCrunch.Core.TestManagement.TestRunnerProcess.LoadTestRunnerProcessForProjectReturningProcessId(SnapshotComponent snapshotComponent, IList`1 componentsInProcess, TestFrameworkDescription[] testingFrameworks, Nullable`1 newProcessTag, FilePath solutionFilePath, GridClientId client, CustomVariable[] customEnvironmentVariables)
   at nCrunch.Core.Processing.AnalysisTaskLogic.DoProcessTaskAndReturnSuccessFlag()


Does anyone know what the deal is with this?

Thanks!
Remco
#2 Posted : Monday, August 6, 2018 11:52:09 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting!

This is probably a dependency issue. Sometimes if the required nuget packages aren't installed on your system, NCrunch can fail to start the .NET Core process for hosting your test environment. You might be able to find some more error information in the logs if you turn on the 'Log to output window' setting and set your 'Log Verbosity' to detailed.

Did NCrunch report any errors or warnings to you in the Tests Window? Normally it will try to restore required packages itself.
jonas
#3 Posted : Monday, August 6, 2018 1:13:48 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/6/2018(UTC)
Posts: 7
Location: Denmark

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Remco;12493 wrote:
Hi, thanks for posting!

This is probably a dependency issue. Sometimes if the required nuget packages aren't installed on your system, NCrunch can fail to start the .NET Core process for hosting your test environment. You might be able to find some more error information in the logs if you turn on the 'Log to output window' setting and set your 'Log Verbosity' to detailed.

Did NCrunch report any errors or warnings to you in the Tests Window? Normally it will try to restore required packages itself.



Hi' thanks for answering.

I tried turning on the log to output window and turn up the verbosity.
I get allow of the following error with on different process ids:

Code:

ENGINE - [15:06:58.0111-ProcessOutputRedirectionErr-16] Process 30564:   Considering entry [Microsoft.TestPlatform.TestHost/15.5.0/lib/netstandard1.5/cs/Microsoft.TestPlatform.CommunicationUtilities.resources.dll], probe dir [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.2], probe fx level:2, entry fx level:0
ENGINE - [15:06:58.0111-ProcessOutputRedirectionErr-16] Process 30564:     Skipping... not found in deps json.
ENGINE - [15:06:58.0111-ProcessOutputRedirectionErr-16] Process 30564:     Skipping... not found in probe dir 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.2'


The test window does not output anymore than the exception I posted above.

Thanks for helping out!
Remco
#4 Posted : Tuesday, August 7, 2018 12:25:16 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks for sharing these error details. I haven't seen this one before. Are you making use of this package yourself? Does adding it as a Nuget dependency to your test project make any difference?
1 user thanked Remco for this useful post.
jonas on 8/7/2018(UTC)
jonas
#5 Posted : Tuesday, August 7, 2018 10:03:41 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/6/2018(UTC)
Posts: 7
Location: Denmark

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Remco;12498 wrote:
Thanks for sharing these error details. I haven't seen this one before. Are you making use of this package yourself? Does adding it as a Nuget dependency to your test project make any difference?


Hi again,

I narrowed it down to my test projects .csproj files was defined as

Code:

<Project Sdk="Microsoft.NET.Sdk">
  ...
</Project>


resulting in the error.

I updated it to
Code:

<Project Sdk="Microsoft.NET.Sdk.web">
  ...
</Project>


I am not sure what is included in the .web part that makes the difference. Maybe you know?
Anyway, thanks a ton for helping out! It really made the difference.

/ Jonas
Remco
#6 Posted : Tuesday, August 7, 2018 10:41:49 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I'm glad you managed to get this working. The 'Sdk' declared in the project element is an indicator to the build system of which set of build targets should be used when building the project. Changing it to a 'web' project will use the set of web targets instead of the standard ones, which somehow seems to have changed the dependency logic here.

I'd really like to find a way to reproduce this problem to avoid other users being affected by it. Can you tell me a bit more about the test project you're working with? Does it have a Nuget reference to the missing package? Was there a specific VS project template you used to create this project? Which test framework does it use?
marcmarsinach
#7 Posted : Monday, April 15, 2019 11:57:17 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/4/2017(UTC)
Posts: 1
Location: Spain

In my case I got this error while referencing a NetFramework project from a NetCore test project. I moved the affected code to a NetStandard project, I removed the reference to the NetFramework project and then, everything worked well
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.048 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download