I am trying to get a bare bones bit of RestSharp into my Windows CE / Compact Framework 3.5 app.
This minimalistic code:
RestClient client = new RestClient("http://192.164.144.42:72921/");
RestRequest request = new RestRequest("api/vendorItems/", Method.GET);
RestResponse response = client.Execute(request) as RestResponse;
string content = response.Content; // raw content as string
...first caused a problem because I had to change this:
RestResponse response = client.Execute(request);
...to this:
RestResponse response = client.Execute(request) as RestResponse;
...but notwithstanding that minor victory, this line still won't compile:
RestRequest request = new RestRequest("api/vendorItems/", Method.GET);
...telling me, "The type 'System.Uri' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=2.0.0.0"
I do have System referenced, but it is version 3.5.0.0 (Runtime version == v2.0.50727)
What can I do to get that line to compile without downgrading my System reference (which would doubtless cause the compiler to squawk about other lines of code)?
UPDATE
In VS 2008, I get lots of err msgs emanating from the compiler scratching its head about new language constructs, such as async things; In VS 2013, I get:
...then:
And in VS 2013 RC it says: "(incompatible) [crlf+Tab] This project is incompatible iwth the current edition of Visual Studio"