Xamarin and System.Reflection.Emit

I just tried to include ServiceStack.HttpClient.Core in my Xamarin.Mac 2.0 app. It all pulls in fine via NuGet and builds, however it bombs at runtime with a problem finding System.Reflection.Emit (see Limitations of Xamarin).

Am I missing something or can this just not be run on a Xamarin app?

Those iOS Limitations shouldn’t apply to Xamarin.Mac. Can you submit a proper issue with code + Exception to https://github.com/ServiceStack/Issues?

Well crap, tried to create an example app but it won’t bomb. Will have to figure out what’s going weird with this one and why it would cry about System.Reflection.Emit.

Sorry, carry on…

Take that back. I was able to make it bomb again. All is fine in the world until I use an HttpUtil. I added a simple one-liner to the fresh Xam.Mac app and it bombed on runtime…

var test = "https://google.com".GetStringFromUrl ();

Filed you an issue for it with an example app:

I just replied to the issue, it works when you switch to use the Xamarin.Mac .NET 4.5 Framework. But you’ll want to use the main ServiceStack.HttpClient package for Xamarin.Mac as when we merge the .NET Core packages back into the main ServiceStack.HttpClient NuGet package NuGet will be selecting the most appropriate build for each platform which will be the .NET 4.5 builds, so you should be developing with that library instead.