Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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 #3937

Closed
Aussiemon opened this issue Aug 10, 2022 · 38 comments

Comments

@Aussiemon
Copy link

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

@nohwnd
Copy link
Member

nohwnd commented Aug 11, 2022

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\**

@carzaza
Copy link

carzaza commented Aug 11, 2022

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

@nohwnd nohwnd pinned this issue Aug 11, 2022
@nohwnd
Copy link
Member

nohwnd commented Aug 11, 2022

I have a repro. Working on a fix.

@nohwnd
Copy link
Member

nohwnd commented Aug 11, 2022

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

@nohwnd nohwnd unpinned this issue Aug 11, 2022
@nohwnd nohwnd pinned this issue Aug 11, 2022
@iqb-dawn
Copy link

iqb-dawn commented Aug 18, 2022

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)'

@nickyquinn
Copy link

nickyquinn commented Aug 18, 2022

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)'

@iqb-dawn
Copy link

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 :)

@nohwnd
Copy link
Member

nohwnd commented Aug 19, 2022

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

Are there just .NET Framework projects in your solution?

@iqb-dawn
Copy link

@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.

@nohwnd
Copy link
Member

nohwnd commented Aug 19, 2022

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
Copy link
Member

nohwnd commented Aug 19, 2022

Making fix for that in #3949

@nohwnd
Copy link
Member

nohwnd commented Aug 19, 2022

@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 :) )

@iqb-dawn
Copy link

@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

@nohwnd
Copy link
Member

nohwnd commented Aug 19, 2022

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.

@snakefoot
Copy link

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

@nohwnd
Copy link
Member

nohwnd commented Aug 26, 2022

@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.

@snakefoot
Copy link

snakefoot commented Aug 26, 2022

@snakefoot
Copy link

snakefoot commented Aug 31, 2022

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/

@AngelJava78
Copy link

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)'

@Jacob273
Copy link

Jacob273 commented Aug 31, 2022

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

@nohwnd
Copy link
Member

nohwnd commented Sep 5, 2022

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: #3939

@fardarter
Copy link

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/

@snakefoot
Copy link

@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 ?

@GNUGradyn
Copy link

GNUGradyn commented Sep 14, 2022

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?

@iqb-dawn
Copy link

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.

@kathyrollo
Copy link

kathyrollo commented Sep 29, 2022

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.

@nohwnd
Copy link
Member

nohwnd commented Sep 30, 2022

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)

@fardarter
Copy link

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.

@IanKemp
Copy link

IanKemp commented Oct 5, 2022

@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?

#3937 (comment)

@a140614
Copy link

a140614 commented Nov 8, 2022

I did the filter and it was looking for only one dll. Till I am getting the same error
I created one build pipeline for running selenium test. I have only one console app project using .net core 5.
Error messages in Azure Devops VsTest - testAssemblies
`vstest.console.exe "D:\a\1\a<myProject>\bin\Debug\net5.0\FrameUI.dll"
/Settings:"D:\a_temp\322c5g2s14u.tmp.runsettings"
/Logger:"trx"
/TestAdapterPath:"D:\a\1\a"
/Diag:"D:\a_temp\Attempt--1_zornvn.diag"
Starting test execution, please wait...
Logging Vstest Diagnostics in file: D:\a_temp\Attempt--1_zornvn.diag
A total of 1 test files matched the specified pattern.
##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\a<myProject>\bin\Debug\net5.0\testhost.deps.json]: No such file or directory
##[debug]Processed: ##vso[task.logissue type=error;]Testhost process exited with error: Cannot use file stream for [D:\a\1\a<myProject>\bin\Debug\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 'D:\a\1\a<myProject>\bin\Debug\net5.0'.
##[debug]Processed: ##vso[task.logissue type=error;]A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'D:\a\1\a<myProject>\bin\Debug\net5.0'.
##[error]Failed to run as a self-contained app.

##[debug]Processed: ##vso[task.logissue type=error;]Failed to run as a self-contained app.

##[error] - The application was run as a self-contained app because 'D:\a\1\a<myProject>\bin\Debug\net5.0\testhost.runtimeconfig.json' was not found.
##[debug]Processed: ##vso[task.logissue type=error;] - The application was run as a self-contained app because 'D:\a\1\a<myProject>\bin\Debug\net5.0\testhost.runtimeconfig.json' was not found.
##[error] - If this should be a framework-dependent app, add the 'D:\a\1\a<myProject>\bin\Debug\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
##[debug]Processed: ##vso[task.logissue type=error;] - If this should be a framework-dependent app, add the 'D:\a\1\a<myProject>\bin\Debug\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
##[error]. Please check the diagnostic logs for more information.
##[debug]Processed: ##vso[task.logissue type=error;]. Please check the diagnostic logs for more information.
Results File: D:\a_temp\TestResults\VssAdministrator_WIN-MTGTAE4L5EO_2022-11-07_23_39_48.trx
##[error]Test Run Aborted.`

My yml:
`pool:
name: Azure Pipelines
demands:

  • vstest
  • msbuild
  • visualstudio
    steps:
  • task: NuGetCommand@2
    displayName: 'NuGet restore'
  • task: VSBuild@1
    displayName: 'Build solution ***.sln'
    inputs:
    vsVersion: 16.0
  • task: CopyFiles@2
    displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
    inputs:
    SourceFolder: '$(system.defaultworkingdirectory)'
    Contents: |
    ***.dll
    ***.config
    TargetFolder: '$(build.artifactstagingdirectory)'
  • task: PublishBuildArtifacts@1
    displayName: 'Publish Artifact: Build_dll file'
    inputs:
    ArtifactName: 'Build_dll file'
  • task: VisualStudioTestPlatformInstaller@1
    displayName: 'Visual Studio Test Platform Installer'
    inputs:
    versionSelector: latestStable
  • task: VSTest@2
    displayName: 'VsTest - testAssemblies'
    inputs:
    testAssemblyVer2: |
    <myProjectName>.dll
    !
    *TestAdapter.dll
    !\obj**
    !
    \bin*\ref*
    !**\testhost*.*
    searchFolder: '$(build.artifactstagingdirectory)'
    vstestLocationMethod: location
    vstestLocation: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow'
  • task: PublishTestResults@2
    displayName: 'Publish Test Results **/TEST-*.xml'`

@nohwnd
Copy link
Member

nohwnd commented Nov 8, 2022

@a140614 I would try using the filter that is recommended here: #3939 (comment) and replace *Tests.dll with your project dlls name.

The recommended filter:

**\bin\**\*Tests.dll
**\bin\**\*Test.dll

Your filter:

**\bin\**\<myProjectName>.dll

This should correctly target just a single dll in your bin folder, and you don't need the ! excludes below it.

@a140614
Copy link

a140614 commented Nov 9, 2022

@nohwnd Thanks, I have tried those as well. See the logs. Same issue
`vstest.console.exe "D:\a\1\a<myProjectName>\bin\Debug\net5.0<myProjectName>.dll"
"D:\a\1\a<myProjectName>\bin\Debug\net5.0\ref<myProjectName>.dll"
/Settings:"D:\a_temp\z510jgjvdhy.tmp.runsettings"
/Logger:"trx"
/TestAdapterPath:"D:\a\1\a"
Starting test execution, please wait...

A total of 2 test files matched the specified pattern.
##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\a<myProjectName>\bin\Debug\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 'D:\a\1\a<myProjectName>\bin\Debug\net5.0'.

##[error]Failed to run as a self-contained app.

##[error] - The application was run as a self-contained app because 'D:\a\1\a<myProjectName>\bin\Debug\net5.0\testhost.runtimeconfig.json' was not found.

##[error] - If this should be a framework-dependent app, add the 'D:\a\1\a<myProjectName>\bin\Debug\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.

##[error]. Please check the diagnostic logs for more information.

##[error]Unable to find D:\a\1\a<myProjectName>\bin\Debug\net5.0\ref<myProjectName>.deps.json. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk".
Results File: D:\a_temp\TestResults\VssAdministrator_WIN-TEVDQVCQ3H9_2022-11-09_00_35_45.trx

##[error]Test Run Aborted.`

My local it is running using the the below cmd command
vstest.console.exe "C:\Users<userID>\source\repos\SeleniumPractice<myProjectName>\bin\Debug\net5.0<myProjectName>.dll"

@Evangelink Evangelink added bug needs-triage This item should be discussed in the next triage meeting. labels Nov 29, 2022
@omoomoniyi
Copy link

Hi Guys, I am facing the same issue as discussed above, but I am new to this, I am looking for where to downgrade VSTest. Can someone point me to the right place

@chucker
Copy link

chucker commented Jan 7, 2023

@omoomoniyi do you have an Azure Pipeline? If so, you probably want to change its testAssemblyVer2 setting to set a stricter filter. For example:

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

@omoomoniyi
Copy link

omoomoniyi commented Jan 7, 2023

@omoomoniyi do you have an Azure Pipeline? If so, you probably want to change its testAssemblyVer2 setting to set a stricter filter. For example:

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

@chucker Yes, I have an Azure Pipeline, but the setting does not resolve the issue as I am still getting the error

@nohwnd
Copy link
Member

nohwnd commented Jan 16, 2023

@omoomoniyi is there any naming pattern to your test assemblies? Like they always end with Tests? You should avoid the filter with *.dll in the name (like **\*test*.dll), because that forces you to exclude all dlls that don't match.

Much better is a filter, or multiple filters that match your test naming convention, without any * before .dll. For example matching *Tests.dll and *Tests.dll in your bin folders. And no exclusions needed.

**\bin\**\*Tests.dll
**\bin\**\*Test.dll

@nohwnd nohwnd added by-design and removed bug needs-triage This item should be discussed in the next triage meeting. labels Feb 9, 2023
@nohwnd
Copy link
Member

nohwnd commented Feb 9, 2023

The underlying issue of matching .net standard dlls was implemented, rest is by desing, we don't want to skip your dlls, please use the suggested specific filter here or in #3939, rather than the azure devops default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests