Hi,
tldr:In one of my test projects I get the error
Quote: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.(EffectiveProcessorArchitecture , 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()
Details:My solution has plenty of other test projects which, as far as I can tell, look exactly the same. They all work just fine.
I checked into the workspace directory of NCrunch, and the project is being built successfully. On the other hand, the error message also states "after it was built".
The only somewhat strange thing is that I see in NCrunch's window just before the error a warning:
Quote:WARNING - ..\..\..\..\..\..\Users\myusername\.nuget\packages\microsoft.sourcelink.common\1.0.0\build\Microsoft.SourceLink.Common.targets (52, 5): : Source control information is not available - the generated source link is empty.
This is odd insofar as my sourcelink related settings all come from a Directory.Build.props file in the root of the solution in which I've explicitly activated them only for non-ncrunch builds:
Code:
<PropertyGroup>
<Version>1.4.800</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(NCrunch)' != '1'">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedAllSources>true</EmbedAllSources>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<ItemGroup Condition="'$(NCrunch)' != '1'">
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.*" PrivateAssets="All" />
</ItemGroup>
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
so it's strange where that warning comes from. But on the other hand, the warning
a) appears in all other test projects, too, which don't have the analysis error
b) is an output of the build which runs successfully
I can run the tests outside NCrunch just fine, for example with
So right now I got no idea how I can further debug this to find out what's the problem. Any help would be very much appreciated.
Thanks,
MR