Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Cannot run DataRow tests with array Type arguments under Native AOT

Chiusa
#11,994 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #11999 di @Sergio0694 — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
testing

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C#
Stelle
1.1k
Fork
312
Merge medio
8h 45m
PR unite (30g)
402

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/testfx

Tutte le issue di microsoft/testfx

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.