vstest icon indicating copy to clipboard operation
vstest copied to clipboard

[17.3.0] Testhost process exited with error: Cannot use file stream for [...\bin\Debug\net6.0\testhost.deps.json]: No such file or directory

Open Aussiemon opened this issue 2 years ago • 26 comments

Description

Testing fails with VSTest 17.3.0 in an Azure DevOps pipeline and produces the following errors:

[error]Testhost process exited with error: Cannot use file stream for [...\bin\Debug\net6.0\testhost.deps.json]: No such file or directory
[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
[error]Failed to run as a self-contained app.
[error]  - The application was run as a self-contained app because '...\bin\Debug\net6.0\testhost.runtimeconfig.json' was not found.
[error]  - If this should be a framework-dependent app, add the '...\bin\Debug\net6.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
[error]. Please check the diagnostic logs for more information.

Downgrading the version to 17.2.0 passes successfully.

Steps to reproduce

  1. Set Azure DevOps pipeline to install the latest VsTest platform.
  2. Set Azure DevOps pipeline to run tests with the below settings:
Running tests using vstest.console.exe runner.
======================================================
Test selector : Test assemblies
Test filter criteria : null
Search folder : C:\..\..\_w\212\s
Action when minimum tests threshold not met : donothing
Minimum tests expected to be run: 0
Run in parallel : false
Run in isolation : false
Path to custom adapters : null
Other console options : null
Code coverage enabled : true
Diagnostics enabled : true
SystemVssConnection exists true
Run the tests locally using vstest.console.exe
========================================================
Source filter: **\*test*.dll,!**\obj\**,!**\<project name>.Tests\**

Expected behavior

Testing should succeed as it did previously with version 17.2.0.

Actual behavior

Testing fails with version 17.3.0 and the above errors.

Diagnostic logs

VsTestLogs.txt

Environment

OS Name: Microsoft Windows Server 2019 Standard Version: 10.0.17763 Build 17763 Console Version: VsTest\17.3.0\x64\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Aussiemon avatar Aug 10 '22 19:08 Aussiemon

It seems that your run includes a lot of dlls that don't contain tests, and most of the error out, but it also tries to run tests from testhost.dll, could you try changing the filter to follow your naming convention, so it only matches *Tests.dll?

From: Source filter: **\*test*.dll,!**\obj\**,!**\<Function App Project Name>.Tests\** To: Source filter: **\*Tests.dll,!**\obj\**,!**\<Function App Project Name>.Tests\**

nohwnd avatar Aug 11 '22 11:08 nohwnd

We have had the same problem in my team and changing the filter works OK, thank you @nohwnd :-)

carzaza avatar Aug 11 '22 12:08 carzaza

I have a repro. Working on a fix.

nohwnd avatar Aug 11 '22 12:08 nohwnd

openend #3939 with suggested filters to use while we are fixing it.

nohwnd avatar Aug 11 '22 13:08 nohwnd

My Azure Dev Pipelines suddenly stopped working this week (working since more than 1 years without any change).

[Running tests using vstest.console.exe runner.
======================================================
Test selector : Test assemblies
Test filter criteria : null
Search folder : D:\a\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).
Run in parallel : false
Run in isolation : false
Path to custom adapters : null
Other console options : null
Code coverage enabled : false
Diagnostics enabled : false
SystemVssConnection exists true
Run the tests locally using vstest.console.exe
========================================================
Source filter: **\*test*.dll,!**\*TestAdapter.dll,!**\obj\**

##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
##[error]. Please check the diagnostic logs for more information.
##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
##[error]Failed to run as a self-contained app.
##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
##[error]. Please check the diagnostic logs for more information.
##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
##[error]Failed to run as a self-contained app.
##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
##[error]. Please check the diagnostic logs for more information.
##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
##[error]Failed to run as a self-contained app.
##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyBackend.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
##[error]. Please check the diagnostic logs for more information.

](url)

Here is glimpse of YAML,

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

iqb-dawn avatar Aug 18 '22 08:08 iqb-dawn

Have you tried the fix suggested by nohwnd? Worked for me... your output suggests the test filter is **\*test*.dll. So I think in your case it should be:

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\*UnitTest*.dll
      !**\*TestAdapter.dll
      !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)'

nickyquinn avatar Aug 18 '22 08:08 nickyquinn

I have updated to this,

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\*UnitTest*.dll
      !**\*TestAdapter.dll
      !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)'  

and it worked like a charm but I don't think its good idea from VsTest to break the running pipelines suddenly, thanks @nickyquinn and @nohwnd :)

iqb-dawn avatar Aug 18 '22 08:08 iqb-dawn

@iqb-dawn I don't think it is a good idea either.

Are there just .NET Framework projects in your solution?

nohwnd avatar Aug 19 '22 07:08 nohwnd

@nohwnd I have multiple projects/applications so they have different pipelines in same Azure DevOps project. Interestingly, only .NET Core 5 pipeline broken.

The .NET framework pipeline is using,

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

Which is still working fine. But .NET Core 5 project with below line is broken for some reason,

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

The .NET framework test project name is *.UnitTests while .NET Core 5 test project name is *.UnitTest may be this is the reason.

iqb-dawn avatar Aug 19 '22 09:08 iqb-dawn

I think that is because you are forcing the platform by setting the platform: which partially reverts you back to the older behavior where we have 1 common target framework, and so .NET Standard dlls will run (and do nothing) under .NET Framework, but not under .NET where we try to run them and they miss runtimeconfig.json.

nohwnd avatar Aug 19 '22 09:08 nohwnd

Making fix for that in #3949

nohwnd avatar Aug 19 '22 09:08 nohwnd

@iqb-dawn if possible please post logs from your test run on azure devops so I am not guessing why it is broken. (both working and non-working logs would be highly appreciated :) )

nohwnd avatar Aug 19 '22 09:08 nohwnd

@nohwnd its auto generated YAML by Azure DevOps.

Here are the VsTests logs.

2022-08-18T07:44:32.9384894Z ##[section]Starting: VSTest
2022-08-18T07:44:32.9534755Z ==============================================================================
2022-08-18T07:44:32.9535070Z Task         : Visual Studio Test
2022-08-18T07:44:32.9535757Z 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).
2022-08-18T07:44:32.9536419Z Version      : 2.205.0
2022-08-18T07:44:32.9536617Z Author       : Microsoft Corporation
2022-08-18T07:44:32.9536884Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/vstest
2022-08-18T07:44:32.9537204Z ==============================================================================
2022-08-18T07:44:33.7186956Z SystemVssConnection exists true
2022-08-18T07:44:33.8345440Z SystemVssConnection exists true
2022-08-18T07:44:33.9262783Z Running tests using vstest.console.exe runner.
2022-08-18T07:44:33.9263459Z ======================================================
2022-08-18T07:44:33.9264719Z Test selector : Test assemblies
2022-08-18T07:44:33.9266050Z Test filter criteria : null
2022-08-18T07:44:33.9267009Z Search folder : D:\a\1\s
2022-08-18T07:44:33.9794749Z Action when minimum tests threshold not met : donothing
2022-08-18T07:44:33.9795120Z Minimum tests expected to be run: 0
2022-08-18T07:44:33.9796297Z VisualStudio version selected for test execution : latest
2022-08-18T07:44:33.9799461Z Attempting to find vstest.console from a visual studio installation with version [17.0,18.0).
2022-08-18T07:44:33.9876029Z Run in parallel : false
2022-08-18T07:44:33.9877016Z Run in isolation : false
2022-08-18T07:44:33.9878752Z Path to custom adapters : null
2022-08-18T07:44:33.9881681Z Other console options : null
2022-08-18T07:44:33.9882255Z Code coverage enabled : false
2022-08-18T07:44:33.9884884Z Diagnostics enabled : false
2022-08-18T07:44:33.9887296Z SystemVssConnection exists true
2022-08-18T07:44:33.9920659Z Run the tests locally using vstest.console.exe
2022-08-18T07:44:33.9921409Z ========================================================
2022-08-18T07:44:34.0005531Z Source filter: **\*test*.dll,!**\*TestAdapter.dll,!**\obj\**
2022-08-18T07:44:34.2143773Z SystemVssConnection exists true
2022-08-18T07:44:34.2146701Z [command]D:\a\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.205.0\Modules\DTAExecutionHost.exe --inputFile D:\a\_temp\input_9a24dbc1-1ec9-11ed-8862-158b99d69f7a.json
2022-08-18T07:44:34.2147441Z ======================================================
2022-08-18T07:44:34.2578119Z ##########################################################################
2022-08-18T07:44:34.2578617Z DtaExecutionHost version 19.204.32418.1.
2022-08-18T07:44:34.5705501Z Starting TestExecution Model...
2022-08-18T07:44:37.1734744Z Result Attachments will be stored in LogStore
2022-08-18T07:44:37.1943905Z Run Attachments will be stored in LogStore
2022-08-18T07:44:37.2021085Z Result Attachments will be stored in LogStore
2022-08-18T07:44:37.2655661Z Result Attachments will be stored in LogStore
2022-08-18T07:44:37.2656354Z Run Attachments will be stored in LogStore
2022-08-18T07:44:37.2935710Z Updated Run Settings:
2022-08-18T07:44:37.2946997Z <RunSettings>
2022-08-18T07:44:37.2947491Z   <RunConfiguration>
2022-08-18T07:44:37.2947901Z     <BatchSize>1000</BatchSize>
2022-08-18T07:44:37.2948214Z     <ResultsDirectory>D:\a\_temp\TestResults</ResultsDirectory>
2022-08-18T07:44:37.2948511Z   </RunConfiguration>
2022-08-18T07:44:37.2948731Z </RunSettings>
2022-08-18T07:44:37.3033564Z **************** Starting test execution *********************
2022-08-18T07:44:37.3139196Z [command]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@D:\a\_temp\awxtuei5bem.tmp"
2022-08-18T07:44:37.4327933Z Microsoft (R) Test Execution Command Line Tool Version 17.3.0-preview-20220626-01 (x64)
2022-08-18T07:44:37.4328771Z Copyright (c) Microsoft Corporation.  All rights reserved.
2022-08-18T07:44:37.4452195Z vstest.console.exe "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\Microsoft.TestPlatform.CommunicationUtilities.dll"
2022-08-18T07:44:37.4453216Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\Microsoft.TestPlatform.CoreUtilities.dll"
2022-08-18T07:44:37.4454116Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\Microsoft.TestPlatform.CrossPlatEngine.dll"
2022-08-18T07:44:37.4454985Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\Microsoft.TestPlatform.PlatformAbstractions.dll"
2022-08-18T07:44:37.4455712Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\Microsoft.TestPlatform.Utilities.dll"
2022-08-18T07:44:37.4456401Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\Microsoft.VisualStudio.TestPlatform.Common.dll"
2022-08-18T07:44:37.4457108Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll"
2022-08-18T07:44:37.4457829Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\MyProject.UnitTest.dll"
2022-08-18T07:44:37.4458310Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4458822Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4459334Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4459841Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4460353Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4460932Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4461439Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4461924Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4462637Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4463150Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4463665Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4464168Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4464659Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4465151Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4465666Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4466191Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4466687Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4467175Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4467671Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4468166Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4468682Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4469870Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4470359Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4470861Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4472132Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4473218Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4474075Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4474584Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4475089Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4475611Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4476530Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4477035Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4477518Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4478017Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4478527Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4479038Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4479662Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4480155Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4480641Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4481151Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4481682Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4482186Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4482696Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4483211Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4483738Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4484261Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4484762Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4485242Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4485742Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4486696Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4487125Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.dll"
2022-08-18T07:44:37.4487569Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4488072Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4488545Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4489050Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4489565Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4490089Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4490617Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4491127Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4491636Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4492164Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4492701Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.TestPlatform.CommunicationUtilities.resources.dll"
2022-08-18T07:44:37.4493201Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.TestPlatform.CoreUtilities.resources.dll"
2022-08-18T07:44:37.4493711Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.TestPlatform.CrossPlatEngine.resources.dll"
2022-08-18T07:44:37.4494235Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.VisualStudio.TestPlatform.Common.resources.dll"
2022-08-18T07:44:37.4494812Z "D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll"
2022-08-18T07:44:37.4495242Z /Settings:"D:\a\_temp\lzjliefozek.tmp.runsettings"
2022-08-18T07:44:37.4495503Z /Logger:"trx"
2022-08-18T07:44:37.4495721Z /TestAdapterPath:"D:\a\1\s"
2022-08-18T07:44:38.5978059Z Starting test execution, please wait...
2022-08-18T07:44:39.0583451Z A total of 74 test files matched the specified pattern.
2022-08-18T07:44:39.3379713Z ##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
2022-08-18T07:44:39.3382058Z ##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
2022-08-18T07:44:39.3384047Z ##[error]Failed to run as a self-contained app.
2022-08-18T07:44:39.3391528Z ##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
2022-08-18T07:44:39.3399316Z ##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
2022-08-18T07:44:39.3403372Z ##[error]. Please check the diagnostic logs for more information.
2022-08-18T07:44:39.4251625Z ##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
2022-08-18T07:44:39.4257137Z ##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
2022-08-18T07:44:39.4259757Z ##[error]Failed to run as a self-contained app.
2022-08-18T07:44:39.4262571Z ##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
2022-08-18T07:44:39.4265784Z ##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
2022-08-18T07:44:39.4267925Z ##[error]. Please check the diagnostic logs for more information.
2022-08-18T07:44:39.4529251Z ##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
2022-08-18T07:44:39.4531970Z ##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
2022-08-18T07:44:39.4533611Z ##[error]Failed to run as a self-contained app.
2022-08-18T07:44:39.4538367Z ##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
2022-08-18T07:44:39.4540269Z ##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
2022-08-18T07:44:39.4541627Z ##[error]. Please check the diagnostic logs for more information.
2022-08-18T07:44:39.4818673Z ##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
2022-08-18T07:44:39.4821178Z ##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
2022-08-18T07:44:39.4822780Z ##[error]Failed to run as a self-contained app.
2022-08-18T07:44:39.4824696Z ##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
2022-08-18T07:44:39.4827178Z ##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
2022-08-18T07:44:39.4829056Z ##[error]. Please check the diagnostic logs for more information.
2022-08-18T07:44:39.5112681Z ##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
2022-08-18T07:44:39.5115100Z ##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
2022-08-18T07:44:39.5116715Z ##[error]Failed to run as a self-contained app.
2022-08-18T07:44:39.5118493Z ##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
2022-08-18T07:44:39.5120323Z ##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
2022-08-18T07:44:39.5121453Z ##[error]. Please check the diagnostic logs for more information.
2022-08-18T07:44:39.5465969Z ##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
2022-08-18T07:44:39.5469470Z ##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
2022-08-18T07:44:39.5471240Z ##[error]Failed to run as a self-contained app.
2022-08-18T07:44:39.5473847Z ##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
2022-08-18T07:44:39.5476783Z ##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
2022-08-18T07:44:39.5478650Z ##[error]. Please check the diagnostic logs for more information.
2022-08-18T07:44:39.5736283Z ##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
2022-08-18T07:44:39.5739001Z ##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
2022-08-18T07:44:39.5740478Z ##[error]Failed to run as a self-contained app.
2022-08-18T07:44:39.5742457Z ##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
2022-08-18T07:44:39.5744267Z ##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
2022-08-18T07:44:39.5745585Z ##[error]. Please check the diagnostic logs for more information.
2022-08-18T07:44:39.6020355Z ##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.deps.json]: No such file or directory
2022-08-18T07:44:39.6022742Z ##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
2022-08-18T07:44:39.6024296Z ##[error]Failed to run as a self-contained app.
2022-08-18T07:44:39.6026170Z ##[error]  - The application was run as a self-contained app because 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' was not found.
2022-08-18T07:44:39.6028429Z ##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
2022-08-18T07:44:39.6030754Z ##[error]. Please check the diagnostic logs for more information.
2022-08-18T07:44:43.7032915Z [xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.17)
2022-08-18T07:44:48.1545371Z [xUnit.net 00:00:04.49]   Discovering: MyProject.UnitTest
2022-08-18T07:44:48.4409646Z [xUnit.net 00:00:04.77]   Discovered:  MyProject.UnitTest
2022-08-18T07:44:48.4412006Z [xUnit.net 00:00:04.77]   Starting:    MyProject.UnitTest
2022-08-18T07:44:50.3821550Z   Passed MyProject.UnitTest..............

Passed Tests are Removed For Bravity

2022-08-18T07:44:50.4954234Z   Passed MyProject.UnitTest..............
2022-08-18T07:44:51.0574895Z [xUnit.net 00:00:07.39]   Finished:    MyProject.UnitTest
2022-08-18T07:44:51.6314234Z   Passed MyProject.UnitTest...............................

Passed Tests are Removed For Bravity

2022-08-18T07:44:51.7101590Z   Passed MyProject.UnitTest............................
2022-08-18T07:44:53.8758348Z No test is available in D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\cs\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\de\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\es\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\fr\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\it\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ja\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ko\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pl\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\pt-BR\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\ru\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\tr\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hans\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.TestPlatform.CommunicationUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.TestPlatform.CoreUtilities.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.TestPlatform.CrossPlatEngine.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.VisualStudio.TestPlatform.Common.resources.dll D:\a\1\s\MyProject.UnitTest\bin\Release\net5.0\zh-Hant\Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
2022-08-18T07:44:54.1411882Z Results File: D:\a\_temp\TestResults\VssAdministrator_WIN-JFKRREF8GOL_2022-08-18_07_44_50.trx
2022-08-18T07:44:54.1601866Z Total tests: Unknown
2022-08-18T07:44:54.1603153Z ##[error]Test Run Aborted.
2022-08-18T07:44:54.1604317Z      Passed: 673
2022-08-18T07:44:54.1616214Z  Total time: 14.9030 Seconds
2022-08-18T07:44:54.1994092Z Vstest.console.exe exited with code 1.
2022-08-18T07:44:54.1994732Z **************** Completed test execution *********************
2022-08-18T07:44:54.2081136Z Test results files: D:\a\_temp\TestResults\VssAdministrator_WIN-JFKRREF8GOL_2022-08-18_07_44_50.trx
2022-08-18T07:44:55.0843729Z Created test run: 5790
2022-08-18T07:44:55.0845870Z Publishing test results: 444
2022-08-18T07:44:55.1718854Z Publishing test results to test run '5790'.
2022-08-18T07:44:55.1746315Z TestResults To Publish 444, Test run id:5790
2022-08-18T07:44:55.1840552Z Test results publishing 444, remaining: 0. Test run id: 5790
2022-08-18T07:44:55.7901440Z Published test results: 444
2022-08-18T07:44:55.7905237Z Publishing Attachments: 1
2022-08-18T07:44:56.8842814Z Execution Result Code 1 is non zero, checking for failed results
2022-08-18T07:44:57.2237946Z Completed TestExecution Model...
2022-08-18T07:44:57.2461826Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2022-08-18T07:44:57.2464649Z ##[error]Error: The process 'D:\a\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.205.0\Modules\DTAExecutionHost.exe' failed with exit code 1
2022-08-18T07:44:57.2469719Z ##[error]Vstest failed with error. Check logs for failures. There might be failed tests.
2022-08-18T07:44:57.2621837Z ##[section]Finishing: VSTest

iqb-dawn avatar Aug 19 '22 10:08 iqb-dawn

Ah good point, let me re-check where they output the platform. That is not needed for 17.3+ and was not necessary for previous runs either.

nohwnd avatar Aug 19 '22 10:08 nohwnd

Alerts also started for me this monday when building with Azure DevOps (Nothing changed besides it became monday):

##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\tests\NLog.UnitTests\bin\Release\netcoreapp3.1\testhost.deps.json]: No such file or directory
##[error]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
##[error]Failed to run as a self-contained app.
##[error]  - The application was run as a self-contained app because 'D:\a\1\s\tests\NLog.UnitTests\bin\Release\netcoreapp3.1\testhost.runtimeconfig.json' was not found.
##[error]  - If this should be a framework-dependent app, add the 'D:\a\1\s\tests\NLog.UnitTests\bin\Release\netcoreapp3.1\testhost.runtimeconfig.json' file and specify the appropriate framework.
##[error]. Please check the diagnostic logs for more information.

https://dev.azure.com/NLogLogging/NLog/_build/results?buildId=5535&view=logs&j=275f1d19-1bd8-5591-b06b-07d489ea915a&t=023e7c10-1b10-57e0-8fcd-191cc0e0ded0

snakefoot avatar Aug 24 '22 18:08 snakefoot

@snakefoot We are going to publish a fix for 17.3.1 that should make the issue smaller, but it won't completely go away, because we are no longer silently ignoring .NET dlls that are added to the test run together with .NET Framework assemblies.

Solution is to use appropriate filter that only selects your tested dlls, usually a the small one with bin\ in it should work.

nohwnd avatar Aug 26 '22 09:08 nohwnd

Notice for the NLog-project then downgrade from 17.3 to 17.2 did not remove the errors. But retrying the build or various build-agents could give successful builds:

Failing: https://dev.azure.com/NLogLogging/NLog/_build/results?buildId=5538&view=logs&j=f4a2bb40-7e70-5f50-d570-7d7c5c8ca123&t=758a489e-277c-5e20-c6b7-c79a442f2630

Succesful: https://dev.azure.com/NLogLogging/NLog/_build/results?buildId=5548&view=logs&j=275f1d19-1bd8-5591-b06b-07d489ea915a&t=023e7c10-1b10-57e0-8fcd-191cc0e0ded0

snakefoot avatar Aug 26 '22 18:08 snakefoot

The upgrade to 17.3.1 also gives failed builds without any real clue:

Failing: https://dev.azure.com/NLogLogging/NLog/_build/results?buildId=5560&view=logs&j=f4a2bb40-7e70-5f50-d570-7d7c5c8ca123&t=758a489e-277c-5e20-c6b7-c79a442f2630&s=d654deb9-056d-50a2-1717-90c08683d50a

Succesful: https://dev.azure.com/NLogLogging/NLog/_build/results?buildId=5561&view=logs&j=275f1d19-1bd8-5591-b06b-07d489ea915a

snakefoot avatar Aug 31 '22 05:08 snakefoot

Maybe the issue is VSTest 17.3.0 has now somehow become case-sensitive so the filter will not work:

https://adolfi.dev/blog/azure-devops-pipeline-error-when-using-latest-vstest-17-3-0-default-task-configurations-due-to-incorrect-path-filter-casing/

snakefoot avatar Aug 31 '22 19:08 snakefoot

Maybe the issue is VSTest 17.3.0 has now somehow become case-sensitive so the filter will not work:

https://adolfi.dev/blog/azure-devops-pipeline-error-when-using-latest-vstest-17-3-0-default-task-configurations-due-to-incorrect-path-filter-casing/

I have had the same problem and changing the filter works OK

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\*Tests.dll
      !**\*TestAdapter.dll
      !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

AngelJava78 avatar Aug 31 '22 20:08 AngelJava78

Had the same problem and just re-added VSTest@2 entry in pipeline via GUI. Adding VsTest@2 via GUI add these filtering entries mentioned by @AngelJava78 and @nohwnd.

Be careful with vsVersion you choose, as I had other issue while selecting other than 'latest'.

before:

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)' 

after

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\*test*.dll
      !**\*TestAdapter.dll
      !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)'
    vsTestVersion: 'latest'
    publishRunAttachments: false

Jacob273 avatar Aug 31 '22 20:08 Jacob273

Maybe the issue is VSTest 17.3.0 has now somehow become case-sensitive so the filter will not work:

The filter did not become case-sensitive. The issue is that the default filter *test*.dll includes too many dlls. The internal logic in 17.2 silently ignored all .NET Core dlls if there was at least one .NET Framework dll included, including legit .NET Core test dlls.

In 17.3 this no longer happens, and so any .NET Core dll that is not runnable will fail the run.

The solution is to use a filter that matches only your test dlls (e.g. **\bin\**\*Tests.dll) and nothing more. But the filter is still case-insensitive. (So **\bin\**\*tests.dll or **\bin\**\*tEsTs.dll would work equally well.)

Here are examples of the suggested filter to use: https://github.com/microsoft/vstest/issues/3939

nohwnd avatar Sep 05 '22 08:09 nohwnd

So I'm using:

          inputs:
            testAssemblyVer2: |
              **\*Tests*.dll
              !**\*TestAdapter.dll
              !**\obj\**
              !**\bin\**\ref\**

From: https://zimmergren.net/unable-to-find-deps-json-dotnet-azure-devops/

fardarter avatar Sep 07 '22 12:09 fardarter

@nohwnd Will it give problems for VsTest if using multi-target for the unit-test library, and the output-folder then contains dlls from multiple frameworks:

<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>

Where netcoreapp3.1-dlls supports testhost.deps.json but not net461 ?

snakefoot avatar Sep 07 '22 17:09 snakefoot

I understand this is caused by the default filter picking up dlls that it's not meant to and searching them for unit tests, but why is this suddenly a problem now? What changed? Have the default filters changed or is it the way it matches files?

GNUGradyn avatar Sep 14 '22 21:09 GNUGradyn

I am sorry to say but I will call its a very bad decision by the team. If you going to break lot of consumers then you should at least prior inform them.

iqb-dawn avatar Sep 15 '22 13:09 iqb-dawn

I've used the same filters for 2 years and suddenly the whole pipeline fails while all tests are passing.

2022-09-29 14_26_38-Window

2022-09-29 14_27_00-Window

This is a bad decision indeed.

kathyrollo avatar Sep 29 '22 04:09 kathyrollo

I understand this is caused by the default filter picking up dlls that it's not meant to and searching them for unit tests, but why is this suddenly a problem now? What changed? Have the default filters changed or is it the way it matches files?

This changed, .NET "Core" dlls were silently ignored if there was at least one .NET Framework dll in the mix. Which causes tests to be lost. https://github.com/microsoft/vstest/issues/3937#issuecomment-1236725873

nohwnd avatar Sep 30 '22 07:09 nohwnd

I understand this is caused by the default filter picking up dlls that it's not meant to and searching them for unit tests, but why is this suddenly a problem now? What changed? Have the default filters changed or is it the way it matches files?

This changed, .NET "Core" dlls were silently ignored if there was at least one .NET Framework dll in the mix. Which causes tests to be lost. #3937 (comment)

I mean I hear that, but breaking people without putting a whole set of docs on the task remains a bad decision.

Filtering the reference assemblies is also seemingly necessary.

fardarter avatar Sep 30 '22 07:09 fardarter

@nohwnd Implementing a breaking change in this manner is unacceptable regardless of whether it makes the behaviour more "correct" (for your value of "correct") or not. I, and most affected developers, consider "correct" to be "our test run doesn't arbitrarily break out of the blue when I perform a minor version upgrade of a NuGet package".

You do NOT, EVER, release a breaking change without first communicating it to end-users. You do NOT, EVER, release a breaking change as a minor version.

The right way to implement a breaking change is to release a version of the package that causes a warning to be raised around said change, while at the same time releasing a blog post/other communication indicating the behaviour indicated by the warning is going to become the default in the next MAJOR (not minor) version of vstest (because it's a breaking change), and then implementing said behaviour in said major version.

Roll back this change and follow the process I've outlined above, which is basic software engineering discipline for decades, and stop causing unnecessary problems for developers.

I understand this is caused by the default filter picking up dlls that it's not meant to and searching them for unit tests, but why is this suddenly a problem now? What changed? Have the default filters changed or is it the way it matches files?

https://github.com/microsoft/vstest/issues/3937#issuecomment-1236725873

IanKemp avatar Oct 05 '22 09:10 IanKemp