2

Can VS2012 build a proxy in a PCL project to consume a WCF service for SP2010? We add a reference (old school works everywhere else) but once we make calls, for instance GetListsCollectionAsync(), we get all sorts of errors. When we build the proxy, VS gives a warning:

Service proxy generation failed. Proxy requires type 'System.Xml.Linq.XElement' which is not supported in portable libraries

Has anyone successfully subscribed to a SharePoint WCF using a portable class library? The same stuff works fine in .net 4.5 class libraries and in metro libraries. Only portable ones give us this problem. We have win 7 and win 8 devices in the mix - so PCL would be a really good fit.

jaredk
  • 986
  • 5
  • 21
  • 37
Gregor
  • 134
  • 8

1 Answers1

1

Got a conclusion here: We found a work around and the statement that this is a bug in VS2012 PCL projects still stands.

We created our proxy in a metro project and simply copied the reference.cs file over into the PCL project. It was a "what the heck - why not" last attempt of sorts, but it actually works. Even better, the calls are awaitable and come with response objects. Awesome!

Cheers,

Gregor

Gregor
  • 134
  • 8