how to add webservice reference in xamarin.forms portable project

Hi,

I'm seen the "Todo PCL" example from xamarin forms examples, and i try to add webservice reference, and can't appear the menu "add webservice reference" (Reference > right click at mouse button ), i in visual studio 2015 Update 2 portable project.

i was see the todoWCF example and its included webservice proxy setting in the portable solution.

How can i add and generate all objects related to wsdl webservice (proxy setting, etc) in the portable solution?

Regards
Javier Garcia

Answers

  • leninmathileninmathi USMember ✭✭

    do right click on the portable project "Todo(Portable)", then you can see the "Add ServiceReference" option. Note, if your project support WinPhone 8.0 or higher, you could not able to add the service reference.

  • i remove the Winphone 8.0 and 8.1 projects, change the target framework in shared project properties (uncheck windows phone 8.1 target), close & open solution, and.... it works, now appear the "Add Service Reference" option in context menu. :smile:

    Thanks.

  • ViswashastryViswashastry USMember

    How to add web service reference if we have to for Andriod, IOS and Winphone in 2015?

    Do i need to develop separately for each Mobile?

  • SujaBSujaB USUniversity ✭✭✭

    @GeraldVersluis @ThomasBurkhart @FredyWenger @leninmathi
    Hi all,
    I had the same issue which javier has has mentioned.Then i tried to uncheck the windows 8.1 option and click Ok.
    But iam getting an error

    "** The project's target cannot be changed.The selected targets require the project to opt-into Nuget 3.0 support.However,Visual studio cannot automatically do this for you.Please uninstall all nuget packages and try again**".

    How can i solve this?
    Since i have not added any nuget reference.Only default refernce are there.

  • SujaBSujaB USUniversity ✭✭✭

    Sorry I have installed FreshMvvm package.After uninstalling it and unchecked Windows 8.1 it worked.But facing some other issue.
    After selecting service reference i click on advanced option.But there "Add web service" button is missing which will be there in normal c# application.

  • After selecting service reference i click on advanced option.But there "Add web service" button is missing in PCL. Please provide us solution or we need to create different library project for android and iOS?

  • patrickmzpatrickmz USMember ✭✭

    @javiergarcia.8465 said:
    i remove the Winphone 8.0 and 8.1 projects, change the target framework in shared project properties (uncheck windows phone 8.1 target), close & open solution, and.... it works, now appear the "Add Service Reference" option in context menu. :smile:

    Thanks.

    @javiergarcia.8465 said:
    i remove the Winphone 8.0 and 8.1 projects, change the target framework in shared project properties (uncheck windows phone 8.1 target), close & open solution, and.... it works, now appear the "Add Service Reference" option in context menu. :smile:

    Thanks.

    How to change the target framework in shared project properties ?

  • Abhi14036Abhi14036 Member ✭✭

    I have the same issue... that I cannot add references to our xamarin.forms.

Sign In or Register to comment.