I'm using RestSharp
in a portable dll for Xamarin and WP platform. Actually I've created the method GET
with this code inside of it:
var client = new RestClient("http://localhost/api/v1/");
var request = new RestRequest(requestUri, Method.GET);
var queryResult = client.Execute(request);
I set up a client
with my base url, in the request
variable I passed the resource to add to the base url as the documentation says. And finally I execute the request saving the content inside queryResult
. The problem is that when I execute this code, on this line:
var client = new RestClient("http://localhost/api/");
I get:
FileNotFoudnException was not Managed
System.IO.FileNotFoudnException in RestSharp.Portable.HttpClient.dll
Cannot load the file or assembly 'System.Net.Http.Primitives, Version = 1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d503a0
what is wrong?