`PortableClient` constructor does not work after moving project

I have a portable class library project that I just migrated from a fully portable solution to one where only some projects are migrated. The PCL project uses a library PortableRest

to communicate with some web services. As soon as I moved my PCL project to my large project, I started getting an exception at the line:

var client = new RestClient();

      

If I put the same code in a new, non-promising class library, that same line of code works fine. This code also works fine in PCL code, but only in its original solution and not in the new one, so it is also PortableRest.RestClient

completely designed to work in a portable project, it works in its home project and not a new one.

The exception I am getting on this ctor line is:

MissingMethodException: "Method not found: 'Void System.Net.Http.HttpClientHandler.set_AutomaticDecompression(System.Net.DecompressionMethods)'."

      

It might be worth emphasizing: I haven't changed the code at all. Moved only the project that is used PortableClient

from one solution to another.

+3


source to share





All Articles