Build/Test Issues

Netcore failed: An assembly specified in the application dependencies manifest was not found

Started by lukesch on 3,625 views

I was having many problems getting ncrunch to work on a netcoreapp3.1 unit test project. I was receiving the error:

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()


I turned on
Log to Output Window: true
Log Verbosity: detailed

and discovered by looking in the processing queue for my busted tests that the commandline ncrunch was running. I ran the command myself and received this error

(15:20:54.55) λ "C:\Program Files\dotnet\dotnet.exe" "C:\Users\lukesch.REDMOND\AppData\Local\NCrunch\2124\10\Git\Bothell\sources\test\Common\src\SecureStringUtilsTests\bin\x64\nCrunch.TaskRunner.DotNetCore.20.x64.dll" 2124 nCrunch_cf0f0bc823f44e83b0a77bbfd716caad 9881cff346ce497dbb11a527d90a60cd "c:\program files (x86)\microsoft visual studio\2019\enterprise\common7\ide\extensions\remco software\ncrunch for visual studio 2019\nCrunch.TestExecution.DotNetCore.dll" nCrunch.TestExecution.RemoteTaskRunner "C:\Users\lukesch.REDMOND\AppData\Local\NCrunch\2124\10\Git\Bothell\sources\test\Common\src\SecureStringUtilsTests\bin\x64" "False" "C:\Users\lukesch.REDMOND\AppData\Local\NCrunch\2124\10\Git\Bothell\sources\test\Common\src\SecureStringUtilsTests\bin\x64\Internal.Exchange.Build.Applications.Common.SecureStringUtilsTests.dll.config.ncrunchconfig"
Error:
An assembly specified in the application dependencies manifest (nCrunch.TaskRunner.DotNetCore.20.x64.deps.json) was not found:
package: 'FluentAssertions', version: '5.10.3'
path: 'lib/netcoreapp2.1/FluentAssertions.dll'


The only way I could figure out how to fix this was to turn on "Copy Referenced Assemblies to Workspace" for the test project. Is there a better way? These tests work fine running directly out of visual studio.
Hi, thanks for sharing this problem.

Normally, this shouldn't happen. When the assembly is specified in the .deps.json file, the runtime should be able to find it without it needing to be copied to the runtime directory. Somewhere in the toolset there is something unexpected going on.

If you create a sample project referencing FluentAssertions, do you get the same result? Are you able to build a small sample that can produce this problem that you might be able to share with me?

Post a reply

Log in to reply.