I have a piece of code that gets a JSON response and checks whether there is a .error field
dynamic jsonResponse = JsonConvert.DeserializeObject(responseString);
if (jsonResponse.error != null) { error = jsonResponse.error; }
else
{
success = true;
}
This runs successfully when it is not compiled with .NET Native toolchain but produces an error (on jsonResponse.error) when it's built with it.
What is the reason for this? Any other similar incompatible behavior with native code?
EDIT: It turns out that even if there is an "error" key in the JSON, we still get an error. The exception is:
System.Reflection.MissingMetadataException: ''Microsoft.CSharp.RuntimeBinder.CSharpGetMemberBinder' is missing metadata. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=392859'