Search code examples
c#androidasp.netwcf

Cannot Update WCF reference for android application


As the name suggest, I cannot update the reference to a service. I start the service on my machine, then try to update the service, but to no avail. Following the error log, I came to the conclusion that I am missing the Java.Interop... But I checked, I don't see any reference to that file in either of my solutions. I think the other errors are cascading from there. Here's the log:

Resolving project references ...
Importing web service metadata ...
Number of service endpoints found: 2
Scaffolding service reference code ...
Warning:Warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load file or assembly 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. The system cannot find the file specified.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IDeliveryService']
Warning:Warning: Cannot import wsdl:port
Detail: 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='DeliveryService']/wsdl:port[@name='BasicHttpBinding_IDeliveryService']
Warning:Warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IDeliveryService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='NetTcpBinding_IDeliveryService']
Warning:Warning: No endpoints compatible with .Net Core apps were found.
Warning:Warning: Cannot import wsdl:port
Detail: 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='DeliveryService']/wsdl:port[@name='NetTcpBinding_IDeliveryService']
Warning:Warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IDeliveryService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IDeliveryService']
Error:Error: No code was generated.
If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services, or because all contracts/services were discovered to exist in --reference assemblies. Verify that you passed all the metadata documents to the tool.
Done.

I have checked the reference, it calls for my computer, on ports that I have opened specifically for it, and it calls a service that is turned on. I've tried finding it as a package and installing it, but I didn't find it. Any idea where it's from and how can I restore it?


Solution

  • You can find it in this directory:

    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Java.Interop.dll
    

    Then go back to your project and add it to your project.