My pipeline is failing after some refactoring involving project renaming. Although the tests run fine both locally and in the pipeline, I get this error:
<span>"Testhost process for source(s) '../MyProject.dll' exited with error: Error:</span>
<span>An assembly specified in the application dependencies manifest ($SLN_NAME.MyProject.deps.json) was not found:</span>
<span>package: 'xunit.abstractions', version: '2.0.3'</span>
<span>path: 'lib/netstandard2.0/xunit.abstractions.dll'</span>
<span>Test Run Aborted."</span>
Although it says test run aborted, it then goes on to run all tests successfully.
The project itself is a class library with the following .csproj:
I have attempted a few solutions I found online, primarily trying to add these two lines of code:
- <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
- <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
The 'CopyLocalLock...' line solved the previous error, but I got a very similar one instead:
<span>"Testhost process for source(s) '../MyProject.dll' exited with error: Error:</span>
<span>An assembly specified in the application dependencies manifest (testhost.deps.json) was not found:</span>
<span>package: 'Microsoft.TestPlatform.CommunicationUtilities', version: '15.0.0.0'</span>
<span>path: 'Microsoft.TestPlatform.CommunicationUtilities.dll'"</span>
<span>I have not been able to find a solution for this one (the 'PublishWithAsp...' setting did nothing for me).</span>
<span>Here is the project structure in case it matters:</span>