Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeInformation.FrameworkDescription has changed behavior in .NET 6? #61394

Closed
mairaw opened this issue Nov 10, 2021 · 2 comments
Closed

RuntimeInformation.FrameworkDescription has changed behavior in .NET 6? #61394

mairaw opened this issue Nov 10, 2021 · 2 comments
Labels
area-System.Runtime.InteropServices untriaged New issue has not been triaged by the area owner

Comments

@mairaw
Copy link
Contributor

mairaw commented Nov 10, 2021

Description

I've notice that this API has changed behavior in .NET 6 and I'm not sure if it's by design.

In .NET 6, the value returned is .NET 6.0.0-rtm.21522.10. In .NET 5, the value returned is .NET 5.0.12.

You can see this behavior on the .NET site footer: https://dotnet.microsoft.com/
I can send internally the repro with the .NET 5 behavior.

Reproduction Steps

This is the code that we have for that:
new HtmlString(
footerHtml.Replace(
">Powered by ASP.NET Core",
$">Powered by {RuntimeInformation.FrameworkDescription}"));

Expected behavior

Return a friendlier version description

Actual behavior

Returns some strings like -rtm, etc. that I don't know where they're coming from. I expected that it would return .NET 6.0.0

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Nov 10, 2021
@hoyosjs
Copy link
Member

hoyosjs commented Nov 10, 2021

Thanks for the report @mairaw. This is a known issue: #61330 and #45812; the fix was proposed but fell through the cracks. It will make 6.0.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime.InteropServices untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants