I am making a portable C# class library and I am trying to add a web service reference to my project.
Using VS 2013, I right click on the solution and in my other projects there would be an option to "Add service reference." But in my mobile library project that option does not exist.
Is there something special one needs to do to add a service reference to a mobile library or is it not possible?
See screenshot, there isn't even an option to add a service reference to my project.
In Solution Explorer, right-click the name of the project to which you want to add the service, and then click Add Service Reference. The Add Service Reference dialog box appears. In the Address box, enter the URL for the service, and then click Go to search for the service.
In Solution Explorer, right-click the name of the project to add the Web service to and then click Add Web Reference. The Add Web Reference dialog box is displayed. In the URL box, enter the URL of the Web service to use.
I was having the same problem. Right after creation of a new project of type "Blank App (Xamarin.Forms Shared) in Visual Studio there was no "Add Service Reference" link when I right clicked on PCL. What I did was I just created another PCL and referenced it instead of default one (which I deleted later). I chose project of type "Class Library (Portable for iOS, Android and Windows)".
And then I went to project's properties and unselected "Windows Phone 8.1" checkbox.
And "Add Service Reference" link appeared all over the sudden.
I am using Visual Stuido 2015 Community Edition (version 14.0.25123.00 Update 2). Hope this will work for you guys too.
The reason you can't add Service Reference in a Xamarin Forms PCL project can be:
Add Reference "System.ServiceModel" and can you see "Service Reference"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With