How to link third party dll from class library in Xamarin.iOS when using VS2012 and Build Host

I making a small cross platform project, and wan't my webservice calls, in a separate class library project. I've created a Xamarin.iOS solution, and added a class library, which is referenced from the application. In the class library, I've defined a simple webservice class that calls a webservice and deserializes the json into a POCO using Newtonsoft.Json. The problem is that because Newtonsoft.Json is referenced from the class library and not the application, the Newtonsoft.Json.dll file is not linked into the application - only the class library dll - and I get a file-not-found when deserializing. I tried to use --linkskip=Newtonsoft.Json in the application but that doesn't help.

How do I force the buildhost to link that dll into the application?

Answers


I finally found a solution. Since the linker don't care to embed the newtonsoft.json.dll in the solution, I add the file to the class library, besides referencing the one in the Component folder. That seems to work. No more "missing file"


Need Your Help

How to detect whether a control is standard or active-x control?

mfc winapi activex visual-c++

In MFC Application, how can we differentiate whether a control is a standard control like CComboBox or it is an custom active-x control?