Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8205489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:15:34+00:00 2026-06-07T08:15:34+00:00

I have seen a previous SO Question here that discusses a similar (identical?) issue,

  • 0

I have seen a previous SO Question here that discusses a similar (identical?) issue, but there was no answer there that could satisfy my problem.

My Environment:

MonoDevelop 3.0.3.2
Installation UUID: ????????
Runtime:
    Mono 2.10.9 (tarball)
    GTK 2.24.10
    GTK# (2.12.0.0)
    Package version: 210090011
Mono for Android not installed
Apple Developer Tools:
     Xcode 4.3.3 (1178)
     Build 4E3002
Monotouch: 5.2.12
Build information:
    Release ID: 30003002
    Git revision: 7bf6ac0ca43c1b12703176ad9933c3484c05c84c-dirty
    Build date: 2012-06-16 04:36:10+0000
    Xamarin addins: 62ad7268d38c2ece7e00dc32960bd3bdab8fec38
Operating System:
    Mac OS X 10.7.4
    Darwin NEWTON.local 11.4.0 Darwin Kernel Version 11.4.0
        Mon Apr  9 19:32:15 PDT 2012
        root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

My Code (Ping & PingResponse are DTOs in my own ServiceModel library):

Ping request = new Ping { LoginInfo = new IMDSSWebService_SS.ServiceModel.ClientLoginInfo { UserName="guest", Password="guest", ClientPlatform="iOS", ClientVersion="1.5", InstanceUID="uid1"} };
var response = _appDel.ServiceClient.Send<IMDSSWebService_SS.ServiceModel.PingResponse>(request);

ServiceStack Libraries:

ServiceStack.Common.Monotouch.dll (built from git src)
ServiceStack.Interfaces.Monotouch.dll (built from git src)
ServiceStack.Text.Monotouch (built from git src)

Exception:

System.ExecutionEngineException has been thrown

Attempting to JIT compile method 'ServiceStack.Text.Json.JsonReader`1:GetParseFn ()' while running with --aot-only.

System.ExecutionEngineException: Attempting to JIT compile method 'ServiceStack.Text.Json.JsonReader`1:GetParseFn ()' while running with --aot-only.

  at ServiceStack.Text.Json.JsonReader.GetParseFn (System.Type type) [0x00000] in :0
  at ServiceStack.Text.Json.JsonTypeSerializer.GetParseFn (System.Type type) [0x00000] in :0
  at ServiceStack.Text.Common.TypeAccessor.Create (ITypeSerializer serializer, ServiceStack.Text.TypeConfig typeConfig, System.Reflection.PropertyInfo propertyInfo) [0x00000] in :0
  at ServiceStack.Text.Common.DeserializeType`1[ServiceStack.Text.Json.JsonTypeSerializer].GetParseMethod (ServiceStack.Text.TypeConfig typeConfig) [0x00000] in :0
  at ServiceStack.Text.Common.JsReader`1[ServiceStack.Text.Json.JsonTypeSerializer].GetParseFn[PingResponse] () [0x00000] in :0
  at ServiceStack.Text.Json.JsonReader`1[IMDSSWebService_SS.ServiceModel.PingResponse]..cctor () [0x00000] in :0

I did try calling JsConfig.RegisterForAot(), but that didn’t change anything. I also tried various permutations of Link SDK Only, Link All, Link None, but all failed either with the above exception, or didn’t build at all, see below.

Simulator/Debug - Works Fine
Simulator/Release - Works Fine
iPhone/Debug - Exception Above
iPhone/Release - Doesn't even build. (will create a separate SO question)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T08:15:36+00:00Added an answer on June 7, 2026 at 8:15 am

    I added a Type Registration function to ServiceStack.Text.Monotouch.JsConfig.cs that lets you register your custom DTOs for AOT compilation. There is a pull request to the ServiceStack mainline, so this should make it in soon.

    JsConfig Code Change

    You need to register all of your Response DTO Types that aren’t standard C# types (string, int, etc.). My PingResponse DTO includes a StatusEnum Enumeration, so I have to register both before I can Parse a response without throwing a JIT Exception. Using the patch above, I would call the following in my Monotouch App:

    JsConfig.RegisterForAot();
    JsConfig.RegisterTypeForAot<PingResponse>();
    JsConfig.RegisterTypeForAot<StatusEnum>();
    

    This could get really messy for Complicated DTOs. Hopefully someone (maybe I will if time permits) can come up with an automated way of discovering all types in your DTO that should be registered? Maybe reflection?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From a previous question I have seen that the CLR has workstation and server
This question is similar to my previous question but not the same ... please
For those of you who have seen my previous questions, here is the problem.
I have seen many others with similar problems but I cannot find the flaw
I kind of posted a similar question a couple of days ago but that
If you have seen my previous questions, you'd already know I am a big
You might have seen video through you tube in iPhone. Normal MPMoviePlayerController has previous,
Have seen some similar questions: What is the difference between a JavaBean and a
I have seen some people in SO commenting that Singleton Pattern is an anti-pattern.
I have seen behaviour in Perforce that I am unable to explain. I took

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.