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
- [ ] https://github.com/microsoft/testfx/issues/2293
- [ ] https://github.com/microsoft/testfx/issues/2754
- [ ] https://github.com/microsoft/testfx/issues/2755
- [ ] https://github.com/microsoft/testfx/issues/2756
Blog post: https://devblogs.microsoft.com/dotnet/testing-your-native-aot-dotnet-apps/
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-x64and 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
TestMethodattribute instead of relying on reflection discovery, and using the new System.Text.Json serializers.AB#1950768
Blog post: https://devblogs.microsoft.com/dotnet/testing-your-native-aot-dotnet-apps/