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.
Blog post: https://devblogs.microsoft.com/dotnet/testing-your-native-aot-dotnet-apps/