Description
openedon Sep 29, 2022
Description
vstest has a hard-coded list of architectures that is supported by the .NET runtime.
vstest/src/Microsoft.TestPlatform.ObjectModel/Architecture.cs
Lines 6 to 15 in b78b0f6
This hardcoded list means that everytime someone ports .NET to a new architecture, they need to come to this repo and update vstest to get dotnet new xunit && dotnet test
to work. If they forget that, the dotnet test
command fails with strange errors for their users.
Since this repo is not part of the runtime/SDK and ships out of band, all users also have to update the xunit/vstest versions in their project files to pick up the latest release of vstest with the support enabled. For example, dotnet new xunit && dotnet test
still fails out of the box for .NET 6.0.1xx when running on S390x.
The hardcoded list quickly gets out of date. For example, as of right now, vstest is missing 3 architectures that are supported in the runtime for .NET 7: LoongArch64
, Armv6
and Ppc64le
: https://github.com/dotnet/runtime/blob/ebaba40a5a9a71da0167b0838d87974240997113/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Architecture.cs#L38-L52
Is there any way to avoid duplicating the list of supported architectures in this repository and somehow get it from the runtime directly?
See #2954 and #4028, but also note the missing support in vstest for LoongArch64
, Armv6
here because no one tested that.
Steps to reproduce
Try and use .NET 6 on an IBM Z (s390x) machine running Linux and run dotnet new xunit && dotnet test
. Same thing when running .NET 7 for Armv6.
Expected behavior
dotnet new xunit && dotnet test
works out of the box on new architectures, assuming it is supported by the .NET runtime
Actual behavior
dotnet new xunit && dotnet test
fails to work out of the box on new architectures. The folks porting need to update vstest repository. Users of .NET need to update the xunit versions in their project fils to pick up support for new architectures.