microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
897 stars 322 forks source link

TestExecution encountered unexpected failures System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.2.0.0 #4704

Closed julia-trykoz closed 1 year ago

julia-trykoz commented 1 year ago

Diagnostic logs

Starting: Test Assemblies

Task : Visual Studio Test Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VsTest) runner. Test frameworks that have a Visual Studio test adapter such as MsTest, xUnit, NUnit, Chutzpah (for JavaScript tests using QUnit, Mocha and Jasmine), etc. can be run. Tests can be distributed on multiple agents using this task (version 2). Version : 2.228.0 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/vstest

Running tests using vstest.console.exe runner.

Test selector : Test assemblies Test filter criteria : undefined Search folder : C:\agent2_work\1\s Action when minimum tests threshold not met : donothing Minimum tests expected to be run: 0 VisualStudio version selected for test execution : latest Attempting to find vstest.console from a visual studio installation with version [17.0,18.0). Attempting to find vstest.console from a visual studio build tools installation with version [17.0,18.0). Attempting to find vstest.console from a visual studio installation with version [16.0,17.0). Attempting to find vstest.console from a visual studio build tools installation with version [16.0,17.0). Attempting to find vstest.console from a visual studio installation with version [15.0,16.0). Run in parallel : true Run in isolation : false

Other console options : undefined Code coverage enabled : false Diagnostics enabled : false Run the tests locally using vstest.console.exe

Source filter: \release*test*.dll,!\obj** C:\agent2_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.228.0\Modules\DTAExecutionHost.exe --inputFile C:\agent2_work_temp\input_32c61eb0-67f4-11ee-9b13-4331c9e796e2.json

########################################################################## DtaExecutionHost version 19.228.34120.1. Starting TestExecution Model...

[error]TestExecution encountered unexpected failures System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

File name: 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at MS.VS.TestService.Task.Common.VssConnectionHelper.get_Instance() at Microsoft.VisualStudio.TestService.AgentExecutionHost.LocalTestRunHost.InitializeVssConnection() at Microsoft.VisualStudio.TestService.AgentExecutionHost.LocalTestRunHost.Execute(Boolean debugLogs) at Microsoft.VisualStudio.TestService.AgentExecutionHost.Program.Main(String[] args)

nohwnd commented 1 year ago

DTAAgent host is part of azure devops, and not vstest. Please report the issue using one of the ways here: https://learn.microsoft.com/en-us/azure/devops/user-guide/provide-feedback?view=azure-devops