问题
I've just installed the VS2017 release and started a Xamarin cross platform project (actually 4 of them as you'll see below). I see no way to add a web service reference to the library projects in any of the possible configurations (i.e., forms or native, shared or portable). Am I just missing a new method for doing this or is there some kind of setting I need to change to enable this.
Oddly, I CAN add them to the iOS and Android projects. However, it seems strange and redundant to me to add the exact same thing to both of those projects when, seemingly, it belongs in the library project for the two of them to share.
I've added screen shots of the solution explorer below.
回答1:
Would this answer solve your issue? Manually edit the .csproj, change target profile to "Profile78" then you should see the "Add Service Reference" in the platform project.
来源:https://stackoverflow.com/questions/42705096/in-a-vs2017-xamarin-cross-platform-project-how-do-i-add-a-web-service-reference