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

System.BadImageFormatException for VSTest@2 task in agent version 3.240.1 #10068

Open
2 of 14 tasks
genedodge opened this issue Jun 14, 2024 · 5 comments
Open
2 of 14 tasks

Comments

@genedodge
Copy link

Description

On release of agent version 3.240.1, builds started failing for a pipeline that uses the VSTest@2 task.

This release may or may not be the cause?

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240610.1.1
https://github.com/actions/runner-images/releases/tag/win22%2F20240610.1

Is it regression?

Agent version 3.239.1 did not exhibit this issue

Expected behavior

Tests are run and coverage is collected

Actual behavior

Fails with error:
#[error]Data collector 'Code Coverage' message: Data collector caught an exception of type 'System.BadImageFormatException': 'Image is too small.'. More details: ..

Repro steps

Add VSTest@2 task to yaml build pipeline and run on agent 3.240.1 to see the error

Exact task in affected pipeline is:

  - task: VSTest@2
    displayName: 'Run Unit Tests'
    inputs:
      testAssemblyVer2: |
       **\*Test.Unit.dll
       **\*Tests*
       !**\obj\**
      vsTestVersion: latest
      runInParallel: false
      codeCoverageEnabled: true
      platform: '$(BuildPlatform)'
      configuration: '${{parameters.buildConfiguration}}'
      runSettingsFile: './coverage.runsettings'
@hemanthmanga
Copy link

@genedodge Thank you for bringing this issue to us, we are investigating on this issue and we will update you on this issue after our findings.

@jonadv
Copy link

jonadv commented Jun 18, 2024

Also had this issue, it seems related to this checkbox
image
of Visual Studio Test

unchecking that box made the pipeline complete

@hemanthmanga
Copy link

@jonadv

image

Please enable code coverage checkbox as mentioned in the above screenshot.

@hemanthmanga
Copy link

@jonadv could please provide your comments.

@jonadv
Copy link

jonadv commented Jun 28, 2024

@hemanthmanga
sorry, dont have the time to test this in our environment or share logs.
i just meant it as an indication for people looking into this
once it is fixed, we can turn it back on again and see if it works

same goes for my comment here

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

4 participants