vstest
vstest copied to clipboard
vstest 17.10.0 System.BadImageFormatException Azure Devops Pipelines
Description
Error logged to stderr for ADO Task VSTest2.0 on vstest 17.10.0.
#[error]Data collector 'Code Coverage' message: Data collector caught an exception of type 'System.BadImageFormatException': 'Image is too small.'. More details: ..
https://github.com/actions/runner-images/issues/10068
Steps to reproduce
Run pipeline using windows-latest or windows-2022 since the 17.10.0 update
Expected behavior
Nothing logged to stderr
Actual behavior
The following is logged to stderr
#[error]Data collector 'Code Coverage' message: Data collector caught an exception of type 'System.BadImageFormatException': 'Image is too small.'. More details: ..
However code coverage is still generated.
Diagnostic logs
I can provide complete logs privately.
2.1409
Multiple versions of same extension found. Selecting the highest version.
xunit.runner.visualstudio.dotnetcore.testadapter : 2.4.5.1
##[error]Data collector 'Code Coverage' message: Data collector caught an exception of type 'System.BadImageFormatException': 'Image is too small.'. More details: ..
Environment
Starting: Initialize job
Agent name: 'Azure Pipelines 8'
Agent machine name: 'fv-az171-608'
Current agent version: '3.240.1'
Operating System
Runner Image
Runner Image Provisioner
Current image version: '20240610.1.0'
Agent running as: 'VssAdministrator'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: PowerShell (2.239.1)
Downloading task: DotNetCoreCLI (2.240.0)
Downloading task: SonarCloudPrepare (1.41.1)
##[warning]Task 'Prepare Analysis Configuration' version 1 (SonarCloudPrepare@1) is deprecated.
##[warning]This task is deprecated. Please upgrade to the latest version. For more information, refer to https://docs.sonarsource.com/sonarcloud/advanced-setup/ci-based-analysis/sonarcloud-extension-for-azure-devops/
Downloading task: VSTest (2.240.1)
... ...
==============================================================================
Task : Visual Studio Test
Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VsTest) runner. Test frameworks that have a Visual Studio test adapter such as MsTest, xUnit, NUnit, Chutzpah (for JavaScript tests using QUnit, Mocha and Jasmine), etc. can be run. Tests can be distributed on multiple agents using this task (version 2).
Version : 2.240.1
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/vstest
... ... ...
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@D:\a\_temp\eaehr3nyi2o.tmp"
Microsoft (R) Test Execution Command Line Tool Version 17.10.0 (x64)