Skip to content

RuntimeEnvironment.GetSystemVersion returns wrong version #87908

@luchunminglu

Description

@luchunminglu

Description

I write code in dotnet7, but RuntimeEnvironment.GetSystemVersion() returns v4.0.30319

Reproduction Steps

public static void Main(string[] args)
{
Console.WriteLine(RuntimeEnvironment.GetSystemVersion());
}

Expected behavior

7.0.7

Actual behavior

v4.0.30319

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Runtime.InteropServicesbreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions