Skip to content

Detect the .NET core version at runtime #568

@j82w

Description

@j82w

Issue Title

Detect the .NET core version from a library.

General

I have a library that targets .NET standard 2.0. I need to log the .NET core version of the application using the library for telemetry and troubleshooting purposes. The RuntimeInformation.FrameworkDescription only returns the CLI version, but it works correctly for applications targeting .NET Framework.

Example:
RuntimeInformation.FrameworkDescription return ".NET Core 4.6.28008.01"

Is there any way to reliably get the .NET core version of the application?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.RuntimequestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions