Skip to content

IndexOutOfRangeException in the command line parsor when run from GitHub Actions. #7646

@AraHaan

Description

@AraHaan

Describe the bug

Currently in one of my repositories I tried to get the MTP to work with xunit.v3 when running with .NET SDK 10.0.200 in GitHub Actions, I saw someone was able to use it with 10.0.201 so I tried that on my repository. However this happens on my repository as soon as my action goes to run dotnet build -c Release --no-build on the tests which runs the tests and results in a failure to run the identify & run my tests.

Locally when I use my .NET 11 daily build SDK I am unable to reproduce this issue and it is annoying me greatly.

The failed build: https://github.com/Elskom/IDisposableGenerator/actions/runs/23832789717/job/69469814486?pr=51
the PR: Elskom/IDisposableGenerator#51

Version used

The latest version that xunit.v3 references and the one that .NET 10 SDK v10.0.201 uses.

Steps To Reproduce

  1. add reference to xunit.v3.
  2. add a global.json which only enables MTP.
  3. Reference 10.0.201 .NET SDK with my GitHub Action:
      - name: Install latest .NET 10 SDK
        uses: Elskom/setup-latest-dotnet@main
        with:
          SDK_VERSION: '10.0.201'
          RUNTIME_VERSIONS: ''

Expected behavior

For the tests to run and pass.

Actual behavior

no tests are run at all.

Additional context

The GitHub Action I made basically uses the dotnet-install scripts to install the .NET SDK I want into GitHub actions which is great for when I sometimes want to include the daily preview .NET SDK builds in some of my CI workflows.

Metadata

Metadata

Assignees

Labels

Area: MTPBelongs to the Microsoft.Testing.Platform core library

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions