Steps to Reproduce
- Create a new Xamarin.Forms project targeting Android (used Xamarin.Forms 5.0.0.2196)
- Execute the following statement:
var t = Type.GetType(typeof(string).Name, (a) => null, null, false); at the beginning of the MainActivity.OnCreate method
- Run the project
Current Behavior
Statement throws a NullReferenceException
Expected Behavior
No exception is thrown, and the call to Type.GetType returns null (this behavior is confirmed on .Net 4.7.2)
Stacktrace
Exception looks to be caused by a missing null check on asm in TypeSpec.cs
Contrast this with the dotnet/runtime version