Add Service Reference in a Portable Subset Project
Portable subset projects enable .NET assembly programmers to maintain a single source tree and build system while still supporting multiple .NET implementations (desktop, Silverlight, Windows Phone, and XBOX). Portable subset projects only reference .NET portable libraries which are a .NET framework assembly that can be used on any .NET implementation.
Add Service Reference Details
When adding a service reference in a portable subset project the following restrictions are enforced:
For XmlSerializer, only literal encodings are allowed. SOAP encodings generate an error during import.
For services that use DataContractSerializer scenarios, a data contract surrogate is provided to ensure that reused types come only from the portable subset.
Endpoints which rely on bindings not supported in portable libraries (all bindings except BasicHttpBinding, WSHttpBinding without transaction flow, reliable sessions, or MTOM encoding, and equivalent custom bindings) are ignored.
Message headers are deleted from all message descriptions in all operations before import.
All service operations are generated as asynchronous operations on the client proxy.
Generated client constructors which use non-portable types are removed.
A CookieContainer instance is exposed on the generated client.
A comment is inserted at the top of the file identifying the assembly and version of the code generator:
// This code was auto-generated by Microsoft.VisualStudio.Portable.AddServiceReference, version 220.127.116.11
The ISerializable interface is not supported.
Net.Tcp and PollingDuplex bindings are not supported
The DataContractSerializer will always be used for faults.
IsWrapped is not supported in portable subset projects.