添加服务引用 xamarin PCL [英] add service reference xamarin PCL

查看:30
本文介绍了添加服务引用 xamarin PCL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从 Xamarin 中的可移植类库使用 WCF 服务.我使用的是 Visual Studio 2015.

  1. 在文件资源管理器中打开文件夹
  2. 右键单击~~~.csproj 文件编辑 txt(无论您使用的是记事本还是 notpad++)
  3. 像这样搜索Frameworkprofile

将其更改为 78像这样

  1. 保存您的编辑,然后您的解决方案将自动请求重新加载

  1. 最后右键单击项目溶胶.您将找到 Service Ref.

但我不知道为什么它没有从visualstudio解决希望有帮助

I am trying to consume a WCF service from a Portable Class Library in Xamarin. I am using Visual Studio 2015.

https://mallibone.com/post/integrating-a-wcf-service-in-xamarin.forms

describes that this should be possible and that you can even create the proxy using the 'Add Service Reference' after I right click on references.

however, 'Add Service Reference' is not available. I also have tried to generate the Proxy using SLSVCUtil but than I get a lot of errors seeing that there is no System.ServiceModel available.

解决方案

i don't know why this didn't fixed with visual studio xamarin but this will help you

  • right click ( you can't see Service Ref. )

  1. Open Folder in file Explorer
  2. right click ~~~.csproj file edit txt ( notepad or notpad++ whatever you used )
  3. search for Frameworkprofile like this

change it to 78 like this

  1. save your edit then automatic your solution will request to reload

  1. finally right click in project sol. you will found Service Ref.

but i don't know why it's not solved from visualstudio hope it help

这篇关于添加服务引用 xamarin PCL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆