Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

.NET pipeline fails - 'Assembly was not found'

Andrei Constantin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2023

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:

 

"Testhost process for source(s) '../MyProject.dll' exited with error: Error:
An assembly specified in the application dependencies manifest ($SLN_NAME.MyProject.deps.json) was not found:
package: 'xunit.abstractions', version: '2.0.3'
path: 'lib/netstandard2.0/xunit.abstractions.dll'
Test Run Aborted."
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:
Deps.png
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:
"Testhost process for source(s) '../MyProject.dll' exited with error: Error:
An assembly specified in the application dependencies manifest (testhost.deps.json) was not found:
package: 'Microsoft.TestPlatform.CommunicationUtilities', version: '15.0.0.0'
path: 'Microsoft.TestPlatform.CommunicationUtilities.dll'"
I have not been able to find a solution for this one (the 'PublishWithAsp...' setting did nothing for me).
Here is the project structure in case it matters:
Structure.png

1 answer

1 accepted

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 31, 2023

Hi Andrei and welcome to the community!

The error indicates that the issue is most likely related to your project configuration rather than a problem with Pipelines.

I would suggest first debugging this locally with Docker, using the same Docker image that you use as a build container in Pipelines, and see if the issue is reproducible:

What Pipelines does is start a Docker container for each step based on the image you have specified in your yml file, clone your repo in that container and then execute the commands of the step's script.

If the issue is reproducible, I would suggest reaching out to a forum dedicated to .NET development, e.g. Microsoft's forum here: https://techcommunity.microsoft.com/t5/net/ct-p/dotnet

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events