Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
February 21 in Android
To detect if running on Mono, my code has used the recommendation from http://www.mono-project.com/FAQ:_Technical of Type.GetType("Mono.Runtime"); This seems to not work on an Android Release build. Does that sound right?
> This seems to not work on an Android Release build. Does that sound right?
It's plausible (probable) that we're linking it away. We should probably fix the linker to not remove Mono.Runtime; could you please file a bug for this?
A workaround would be to check for an internal type which isn't likely to disappear. Mono.Runtime would be ideal, but as that's probably being linked away, you should try loading System.MonoType. That's not documented as being stable, but the linker won't remove that type (unless you use no Reflection at all...?), and I don't foresee it being renamed anytime soon.
Type monoSpecificType = Type.GetType ("Mono.Runtime") ?? Type.GetType ("System.MonoType");
bool runningOnMono = monoSpecificType != null;
We now always preserve the Mono.Runtime type.
Today we have checked this issue with following builds:
All Windows and Mac
X.S 4.0.9(build 3)
And we followed following code in console project which is mentioned in gist: https://gist.github.com/atin360/d2337e1d79af774d8eab and run the project and getting wrong output this is the screencast for the same: http://screencast.com/t/cL1DwNjdhJD
While on Mac we are getting correct output like "Hello World! you are running with the mono VM"
Hence, Reopening this issue.
Nischal, this is a bug that occurred on device only. The reason you do not get the expected result on Windows is that, for desktop apps, XS defaults to the .NET runtime. To verify that this is fixed, you must check it with an app that runs on an Android device.
Using the gist from Comment 2, I can confirm we are preserving the Mono.Runtime type when deploying to a physical Android device from OSX.
Nischal, please add your test code to an android project, and deploy to device from Windows to verify this as fixed.