Cannot run DataRow tests with array Type arguments under Native AOT
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
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
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.
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/testfx
-
agentic-workflows area/performance type/automation
Difficulty 4/5 3-5 days Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
[duplicate-code] Duplicate `HasDuplicateModuleIdentity` logic between AzureDevOps and GitHub Actions reportersPossibly taken @Evangelink claimed this today. Opentype/automation type/tech-debt
microsoft/testfx#12000 · 1 reaction · 2 assignees ·
Maintainers usually reply within 1 day
-
[test-improver] Add unit tests for DotnetTestConnection.StartServerControlChannelAsync guard conditionsPossibly taken @Evangelink claimed this today. Openarea/mtp needs/triage
microsoft/testfx#11998 · 1 reaction · 2 assignees ·
Maintainers usually reply within 1 day
-
area/mtp-github-actions-report external/dotnet-test needs/triage
Difficulty 4/5 3-5 days Newbie friendliness 56/100
Maintainers usually reply within 1 day
-
Allow a trailing CancellationToken parameter on MSTest test methodsPossibly taken @Evangelink claimed this 2 days ago. Openarea/mstest area/parameterized-tests needs/triage
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Maintainers usually reply within 1 day
All issues in microsoft/testfx
Similar issues
-
Backend enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
UI: money shows the minus sign next to the number, not before the currency (IL -3.0m, not -IL 3.0m)Openarea: sim area: unity enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eyalgolan/statecraft-israel#1107 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
dimitar-radenkov/Pointframe#271 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
qew21/Genshin-Subtitles#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
HoffmanEngineering/3d-print-log-api#274 ·
Maintainers usually reply within 1 day