A recent study of xamarin.form, feeling that this thing is really good, has been doing WPF-related before, and then see Xamarin.form developing syntax that is particularly similar to WPF. Very interested!
But environment deployment for small white I, but a lot of kung Fu! Installation VS2015 cost me a lot of time! After installation and deployment! Let's start with the pit that references the WCF service!
Official documentation : Xamarin can call WCF, how can I invoke??? (full of question marks) https://developer.xamarin.com/guides/xamarin-forms/web-services/consuming/wcf/https:// developer.xamarin.com/guides/xamarin-forms/web-services/consuming/wcf/
1. Create a WCF service (must be basichttpbinding), deploy to IIS on
The Wcfserviceforxamarin code is not written, it is a simple WCF application. The most side of the source
2. Create Xamarin.form Solution
referencing the WCF service HTTP://LOCALHOST:6688/WCFFORXAMARINCONTRACT.SVC in a portable project
We notice that there is no "service reference" option??? Where to go!!!
Then look at various articles, ask all kinds of communication groups found no one and no answer!
Finally found such a passage:
This is a new thing for me who don't know WinPhone8.1 development! Just want to say I go, Microsoft's own things are not supported!
https://developer.xamarin.com/guides/xamarin-forms/web-services/consuming/wcf/
Looking for this passage for several days! Then I ratione materiae the "portable Project", the target removed
But who can expect to report this mistake!
The target of the project cannot be changed. The selected target requires project selection to join NuGet 3.0 support, but visual Studio cannot do this automatically for you. Please uninstall all NuGet packages and try again.
And then I was going crazy! Is it the wrong thing again! VS Hung Up! The magic is that I can use it the day before! Remember, I've removed Windows Phone 8.1!
Finally, the C disk is almost full of decisions: Redo the system, re-install VS2015 ... Installed a day later, open the project found above this error is still!!! Help me, please!
Then think about where I uninstall the NuGet package! Then I found I only need to uninstall Xamarin.Forms This package can be removed! O (∩_∩) o haha ~
It's out. Then add a service reference
Source: HTTP://PAN.BAIDU.COM/S/1O7FNZLW
If sharing a download fails
qq:276605358
QQ Group: 258510493
Xamarin.form Beginner Service Reference-WCF Service reference