Search code examples
compact-frameworkrestsharpwindows-mobile-6

Restsharp dll compiled for Compact Framework 3.5?


I'm building a windows mobile 6.0 application and I wanted to use restsharp library to consume data from a rest service. I've found information that RestSharp can be compiled for compact framework 3.5 (as is not available from the official site).

But, does anybody have successfully compiled the assembly for CF? If yes, could anybody provide a link to download the assembly. Thanks


Solution

  • I do not know a download location for the ready-to-use assembly.

    I would start a new CF2 project and in another instance of VS open the original restsharp solution. Additionally open two file explorer to copy files of the restsharp source to the new CF2 project directory. You should maintain the same solution layout and folders (if any). Then copy the files over to CF2 dirs and use Add Existing Files in the CF2 solution. You need to use the same namespace and project and solution names (makes live easier).

    Now try to compile. If you are lucky, everything compiles without error. But mostly you have to either adjust code or write CF2 compatible wrappers. If there are two many FullFramework constructs that can not be 'emulated' in CF2, you may have to give up. But as you said, there are CF compatible sources.

    You mentionend CF3.5 and asked for CF2. Possibly RestSharp will only compile as CF3.5 assembly.

    See also: RestSharp: Don’t Serialize null Properties

    BTW: the GitHub repo (https://github.com/restsharp/RestSharp) shows a CF solution file RestSharp.Compact.sln and RestSharp.Compact.csproj. These should work with VS2008.