Skip to content

vstest has a hardcoded list of architectures which makes porting to new architectures harder #4034

Closed

Description

Description

vstest has a hard-coded list of architectures that is supported by the .NET runtime.

public enum Architecture
{
Default,
X86,
X64,
ARM,
AnyCPU,
ARM64,
S390x
}

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.

cc @tmds @MichaelSimons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions