我尝试添加对SOAP WebService的引用.将它添加到项目的
Windows 8.1部分没问题.
但没有机会为WP 8.1做同样的事情.不知怎的,我只能添加一个新的“推送通知”作为参考.
将生成的reference.cs添加到WP项目直接导致System.ServiceModel中的许多未解析的引用(即未找到System.ServiceModel.Channels).
任何的想法?
也许它不在目前的测试版中?
VS 2013 Update 2 RC.
虽然不是一个合适的解决方案,但Microsoft已发布了一个解决方法:
WCF Add Service Reference Not Supported for Windows Phone 8.1 XAML Applications
Windows Phone 8.1 XAML applications does not support the System.ServiceModel namespace,and therefore you are not able to right click references in the project and choose Add Service Reference. The recommended solution is to add a REST endpoint to your WCF endpoint,and access the WCF application through the REST endpoint using HttpClient.