ServiceStack/ServiceStack — Issue #46: Monotouch client cannot be deployed to device
Author: roland
Created: 2011-12-12 03:59:14+00:00
State: open

```var jsonService = new ServiceClient ("http://mylocalhost/");

try {

jsonService.PostAsync("/json/asynconeway/AuthenticateUser", authUserReq, (r) => {
InvokeOnMainThread(delegate {
new UIAlertView ("Success", r.SvcResult ?? "No SvcResult 1", null, "OK").Show();
btnTest4.Enabled = true;
spinLoading4.StopAnimating ();
});
}, (r, ex) => {
InvokeOnMainThread(delegate {
new UIAlertView ("Success", ex.Message ?? "No SvcResult 2", null, "OK").Show();
btnTest4.Enabled = true;
spinLoading4.StopAnimating ();
});
} );

} catch (Exception ex) {
Console.WriteLine(ex.Message + ex.StackTrace);

}
```

When building the following error is shown in the build output:

```Could not link assemblies: Mono.Linker.ResolutionException: Can not resolve reference: System.Reflection.Emit.DynamicMethod
at Mono.Linker.Steps.MarkStep.ResolveTypeDefinition (Mono.Cecil.TypeReference type) [0x00000] in :0
at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00000] in :0
at MonoTouch.Tuner.MonoTouchMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00000] in :0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in :0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in :0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in :0
at Mono.Linker.Steps.MarkStep.Process () [0x00000] in :0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in :0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in :0
at MonoTouch.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in :0```