Skip to content

[xamarin] fix Mono runtime version detection #1429

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

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

jonathanpeppers
Copy link
Member

Context: https://github.com/mono/mono/blob/0a37eeadece5c2cec8a6e1f43a94f0b323a22513/mcs/class/corlib/Mono/Runtime.cs#L68-L73

Mono.Runtime.GetDisplayName is public on Xamarin platforms, and so
we need to include BindingFlags.Public to call it via reflection.

I updated the screenshot in the documentation to reflect what the
value looks like running on Xamarin.Android in VS 2019 16.5.

I also took an attempt at fixing the documentation for Xamarin, I
think the link is just missing. Hopefully this URL will work now:

https://benchmarkdotnet.org/articles/samples/IntroXamarin.html

Context: https://github.com/mono/mono/blob/0a37eeadece5c2cec8a6e1f43a94f0b323a22513/mcs/class/corlib/Mono/Runtime.cs#L68-L73

`Mono.Runtime.GetDisplayName` is `public` on Xamarin platforms, and so
we need to include `BindingFlags.Public` to call it via reflection.

I updated the screenshot in the documentation to reflect what the
value looks like running on Xamarin.Android in VS 2019 16.5.

I also took an attempt at fixing the documentation for Xamarin, I
think the link is just missing. Hopefully this URL will work now:

    https://benchmarkdotnet.org/articles/samples/IntroXamarin.html
@jonathanpeppers
Copy link
Member Author

/cc @adamsitnik

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, @jonathanpeppers thank you for providing the fix and explanation!

@adamsitnik adamsitnik merged commit ccdf229 into dotnet:master Apr 20, 2020
@jonathanpeppers jonathanpeppers deleted the xamarin-runtime-version branch April 20, 2020 21:06
@AndreyAkinshin AndreyAkinshin added this to the v0.12.2 milestone Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants