如何在VS 2015中为UWP添加Web参考? [英] How to Add Web Reference for UWP in VS 2015?

查看:155
本文介绍了如何在VS 2015中为UWP添加Web参考?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的代码从普通的wpf应用程序迁移到 Universal Windows Platform. 以前,我曾使用 VS 2012 来开发WPF应用程序及其正常工作.现在,我也想在移动设备上使用同一应用程序.我找到了 UWP 作为其解决方案.现在我正在使用vs 2015.但是在 vs 2015 中,我找不到 Web参考选项,我只能看到服务参考.实际上,我的情况是我动态地根据请求从用户处获取IP地址和端口号,我正在连接到该特定服务,例如

I am trying to migrate my code from normal wpf application to Universal Windows Platform. Previously I have used VS 2012 for Developing my WPF application And its working fine. Now I want to use the same application for mobile also.I found UWP as a solution for it. Now I am using vs 2015 . But here in vs 2015 I am unable to find Web Reference Option I am able to see only Service Reference. Actually My situation is I am Dynamically taking Ip Address and port number from User Based on the request I am connecting to that particular services like

public const string GET_SKU_DETAILS = "http://{0}:{1}/OmniRetailerServices/SkuServices/getSkuDetails?skuID={2}";

因此,我要连接到特定的远程服务器以访问服务.

So like this I am connecting to particular Remote servers for accessing services.

我在vs 2012中使用Web引用进行了此操作.但是在vs 2015中,我找不到Web引用.所以我的问题是如何在使用VS 2015的UWP应用程序中做到这一点.

And I did this using Web References in vs 2012. But Here in vs 2015 I am not able to find Web Reference. So My Question is How can I do this in UWP application Using VS 2015.

请帮助我解决此问题.

谢谢.

推荐答案

可以.就像继续添加新的服务参考一样(是的,现在您需要添加网络参考),然后在添加服务参考"窗口的左下方,单击高级"选项.然后,再次在底部看到兼容性",并且在添加Web参考"按钮附近,现在就可以了! :)

Yes you can. Just proceed as if you gonna add a new service reference (Yes I now that you need to add a web reference) then on the bottom left of the "Add Service Reference" window, click on "Advanced" option. Then, again on the bottom, you see "Compatibility" and near the "Add Web Reference" button, now got it! :)

这篇关于如何在VS 2015中为UWP添加Web参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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