Skip to content

Add support for NativeAOT #1837

Open
@nohwnd

Description

Originally posted by @dotMorten in: https://github.com/nohwnd/mstest-runner-examples/issues/1

Summary

One of my biggest griefs with MSTest is I can't test if my stuff works right in an AoT build.
Try building your project with dotnet publish -c Release -p PublishAot=true -r win-x64 and run it, and you'll get loads of build warnings, and a runtime crash.

Now I understand why it currently doesn't work (too much reflection and datacontract serializers), but solving this would be huge for ensuring AoT compatibility.

It would likely require a little code generator for each TestMethod attribute instead of relying on reflection discovery, and using the new System.Text.Json serializers.

AB#1950768

Tasks

Preview Give feedback
  1. Area: Native AOT Type: Feature
    Evangelink nohwnd
  2. Area: Native AOT Type: Feature sprint
    nohwnd
  3. Area: Native AOT Type: Feature sprint
    nohwnd
  4. Area: Native AOT Type: Feature sprint
    nohwnd

Blog post: https://devblogs.microsoft.com/dotnet/testing-your-native-aot-dotnet-apps/

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions