I have an iOS/Android Xamarin project that share a PCL project.
I have added a web reference to the PCL via ASMX as per Xamarin's Tutorial. The tutorial doesn't say how to get to the "Add Web Reference" window, but we found it by right-clicking our PCL project and going to Add->Web Reference
.
On adding the web reference I get a roughly 500 line Reference.cs file that is added to the PCL.
However, on compilation, either iOS or Android, I am given several of these errors:
Reference.cs(74,74): Error CS0234: The type or namespace name
IExtensibleDataObject' does not exist in the namespace
System.Runtime.Serialization'. Are you missing an assembly reference? (CS0234) (MyProject)
It is clear that I need to add the System.Runtime.Serialization
assembly reference. However I cannot figure out how to do this and I have spent hours looking for documentation or any relevant solution. Most posts questions appear tangental at best.
This forum post references this issue, but give no solution other than it was supposedly “fixed” three years ago.
Now the aforementioned tutorial references an "Add References…" dialog box for adding the System.Web.Services.dll
if you use "Add files" to add the proxy. However, I cannot find this dialog anywhere in the IDE.
I did find "Edit References" when right-clicking on references. This produced a window with these tabs:
Guessing that the assembly needs to be added here I search for it, but find nothing. Apparently there is no way to add assemblies that are packaged with the IDE, you're expected to "just know" where to find them. Searching for documentation proves fruitless.
Via one of the sample project, I was able to locate the .dll file at /Library/Frameworks/Mono.framework/Versions/4.4.2/lib/mono/xbuild-frameworks/.NETPortable/v4.5/Profile/Profile78/System.Runtime.Serialization.dll
and manually add it via the .NET Assembly tab.
A colleague tried adding the reference via NuGet as well.
Unfortunately the compile errors remain after attempting either approach.
Also, of note, it appears that the ToDoASMX example project nor the folder containing the System.Runtime.Serialization.dll
have any references to the System.Web.Services.dll
that the tutorial mentions.