KEMBAR78
Make Environment.Version return the actual runtime version · Issue #26833 · dotnet/runtime · GitHub
Skip to content

Make Environment.Version return the actual runtime version #26833

@davidfowl

Description

@davidfowl

Today on a .NET Core 2.1.0 project printing Environment.Version prints out 4.0.30319.42000 which is a hard coded constant in the runtime https://github.com/dotnet/coreclr/blob/ce0a2617d40bc217b8e0a2137e340afe585afcb1/src/System.Private.CoreLib/src/System/Environment.cs#L277. This should print out the actual runtime version based on the policy applied by the host (like 2.1.1 if that's what runtime version is actually being used).

This also needs to be used as the version logged into the event log when there's an unhandled exception reported by the runtime. Today is a bogus version which isn't very useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.RuntimeenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions