samedi 1 décembre 2018

How to test C# code on many runtime versions without using any book, tool, software library, tutorial or other off-site resources

Is there a way to compile and run a snippet of C# code on many versions of .NET, specifically different versions of the system runtime library?

I've found System.TimeSpan.Parse("0:00:00.01000000") gives different results on different .NET implementations. Sometimes it throws an OverflowException, sometimes a FormatException, and sometimes it returns a 100ms TimeSpan (it's really 10ms).

I've submitted a patch to Microsoft already. But is there some easy way I can test this across different .NET implementations and different class libraries to work out when the bug first appeared in the .NET System library and how it works on different implementations (i.e. Mono).

Here's a gist of the complete code I'd like to test, although I'm not sure it reports the .NET version information in a complete or useful way.

How can I test it on multiple versions of .NET and Mono without using any book, tool, software library, tutorial or other off-site resources?

Aucun commentaire:

Enregistrer un commentaire