Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Use product version in RuntimeInformation.FrameworkDescription #35516

Merged
merged 3 commits into from
Feb 23, 2019

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Feb 22, 2019

AssemblyFileVersionAttribute attr = (AssemblyFileVersionAttribute)(typeof(object).GetTypeInfo().Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute)));
string expected = string.Format(".NET Core {0}", attr.Version);
Assert.Equal(expected, RuntimeInformation.FrameworkDescription);
Assert.True(RuntimeInformation.FrameworkDescription.StartsWith(".NET Core"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could you add FraneworkDescription as part of a second argument so we're see what it is if the assert fails?

@jkotas jkotas merged commit db95b37 into dotnet:master Feb 23, 2019
@jkotas jkotas deleted the version branch February 23, 2019 07:28
@karelz karelz added this to the 3.0 milestone Mar 18, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…t/corefx#35516)

* Use product version in RuntimeInformation.FrameworkDescription

* Include FrameworkDescription in the Assert

* Strip the git hash in the fallback


Commit migrated from dotnet/corefx@db95b37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants