Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cannot run DataRow tests with array Type arguments under Native AOT

Closed
#11,994 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #11999 by @Sergio0694 — merged

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
testing

Research direction

Start with the attached MSTestArrayRepro.zip project and publish it for Native AOT as described, then compare the results with CoreCLR. Focus on how the array Type argument in DataRow is passed when another test uses a single-argument DataRow. Done means both ArrayTypeRows cases run successfully under Native AOT.

Written by the indexing model from the issue text.

Description

area/native-aot area/parameterized-tests needs/triage type/regression

Describe the bug

A test method containing an array  Type  argument in a  [DataRow]  fails under Native AOT when another test uses a single-argument  [DataRow] .

Repro attached, test passes on CoreCLR but fails under Native AOT.

Version used

  • MSTest / MSTest.Sdk: 4.5.1
  • Microsoft.Testing.Platform: 2.5.1
  • .NET SDK: 10.0.402
  • .NET runtime / Native AOT compiler: 10.0.13
  • Windows x64

Steps To Reproduce

Publish and run below repro project for AOT.

MSTestArrayRepro.zip

Expected behavior

All tests pass

Actual behavior

MSTest v4.5.1 (UTC 2026-10-07)
failed ArrayTypeRows ([System.Int32,"Int32","kind"]) (2ms)
  Cannot run test method 'Repro.ArrayTests.ArrayTypeRows': Test data doesn't match method parameters. Either the count or types are different.
  Test expected 3 parameter(s), with types 'Type, String, String',
  but received 1 argument(s), with types 'Object[]'.
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.GetInvokeResultWithParametersAsync(MethodInfo, Object, ParameterInfo[], Object[]) + 0x4a5
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.<ExecuteInternalAsync>d__63.MoveNext() + 0x2c4
failed ArrayTypeRows ([System.Int32[],"Int32[]","kind"]) (0ms)
  Cannot run test method 'Repro.ArrayTests.ArrayTypeRows': Test data doesn't match method parameters. Either the count or types are different.
  Test expected 3 parameter(s), with types 'Type, String, String',
  but received 1 argument(s), with types 'Object[]'.
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.GetInvokeResultWithParametersAsync(MethodInfo, Object, ParameterInfo[], Object[]) + 0x4a5
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.<ExecuteInternalAsync>d__63.MoveNext() + 0x2c4

Additional context

Dominant language
C#
Stars
1.1k
Forks
312
Avg merge
8h 33m
Merged PRs (30d)
411

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/testfx

All issues in microsoft/testfx

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.