我正在使用Xamarin.Forms / Prism开发移动应用程序。
到目前为止,我使用过PCL Profile 44。 这是因为PCL Profile 44包含WCF的功能。
今天,我使用Prism Template Pack 2.0创建了一个项目。 使用.NET Standard而不是.NET Framework创建了一个项目。
在.NET Framework和PCL Profile 44中,在Visual Studio中的PCL项目中有一个“添加服务引用”项。 但是,当谈到.NET Standard时,该项目在任何地方都不存在。
如何运行“添加服务参考”?
以下网站介绍了使用Xamarin进行WCF访问的方法 https://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/walkthrough_working_with_WCF/
但我不想使用这种方法。 这样,您将在Android / iOS项目中创建WCF访问过程。在这里,我们使用SLsvcUtil.exe。 使用PCL Profile 44时,您可以在PCL项目中编写WCF访问处理。此外,SLsvacUtil.exe是不必要的。
我尝试了以下插件,但添加服务引用时出错。 https://marketplace.visualstudio.com/items?itemName=WCFCORETEAM.VisualStudioWCFConnectedService