1

Currently, we are using .Net Core 2.1 Framework for our test automation Web API Project.

I am trying to run one of the test project dlls for test cases execution.

Please find below the command through Visual Studio IDE

Command : dotnet test APItests.dll,

The above command works well on my local machine with Visual Studio, test cases are getting executed.

I have built the Azure Build pipeline as well as the release pipeline for the same. Also artifacts are getting published to drop location.

But in the release pipeline .Net core test task is failing with the below error.

Framework: .Net Core 2.1

Error:

An assembly specified in the application dependencies manifest (APItests.deps.json) was not found: package: ‘Microsoft.AspNet.WebApi.Client’, version: ‘5.2.6’ path: ‘lib/netstandard2.0/System.Net.Http.Formatting.dll’

Could you please find the YAML file details below.

Steps:

task: DotNetCoreCLI@2 displayName ‘dotnet custom’ inputs: command: custom projects: ‘\TestAutomation.Application.Hosting.WebApi\ApiTests.dll’ custom: vstest workingDirectory: ‘$(System.DefaultWorkingDirectory)’

Could you please have a look once and let me know the suggested solution for the same.

jps
  • 20,041
  • 15
  • 75
  • 79
  • Take a moment to read through the [editing help](//stackoverflow.com/editing-help) in the help center. Formatting on Stack Overflow is different than on other sites. The better your post looks, the easier it is for others to read and understand it. – gunr2171 Dec 30 '21 at 16:22

1 Answers1

1

To resolve this An assembly specified in the application dependencies manifest (APItests.deps.json) was not found: package: ‘Microsoft.AspNet.WebApi.Client’, version: ‘5.2.6’ path: ‘lib/netstandard2.0/System.Net.Http.Formatting.dll’ error, try either of the following ways:

(Thank you Jirapong. Posting your suggestion as an answer to help other community members.)

  • You can try upgrading all project dependencies or modifying the installer to include the new files.

  • If the migration is a class library in Azure Functions project then you have to make sure when you run Add-Migration while the EF Library project is selected as Startup Project.

You can refer to An assembly specified in the application dependencies manifest (appname.deps.json) was not found: package, An assembly specified in the application dependencies manifest (...) was not found and Fixing “An assembly specified in the application dependencies manifest projectname.deps.json was not found”

Ecstasy
  • 1,866
  • 1
  • 9
  • 17