简体   繁体   中英

Visual studio 2015 can't add Service Reference

I know there are a lot of questions like this, but none of them solved my problem.

I have a Windows Phone project, with some associated projects. I need to create a new project with the service reference, but I can't add it.

I found a link where they said to install a component from Add Connected Service > find other services > WCF Services but it says that my project is not supported.

Which kind of project must I create? I have in the same solution a project which has the right-click > add service reference but I was not the creator and I don't know what kind of project it is.

PS: - I can't right click > Add service reference, I tried it in both project name and reference name. - I need a Windows Phone Stuff. I link what i mean with a picture: 在此处输入图片说明 PSS: The destination version of windows phone is not the reason. I tryed changing the WP8.0 into WP8.1 and I can still add the ref

Does anyone know which kind of project I have to add for being able to add service ref?

Thanks

Instead of using Service Reference would suggest you to switch to the Windows recommended REST API endpoints instead. As now Windows is focusing more on REST service consumption than adding service reference that was available earlier.
Sadly now Windows Phone Store apps in Windows Phone 8.1 do not support the System.ServiceModel namespace generated by the Add Service Reference menu. Hence they have removed the option Add Service Reference .
To be able to use it you will have to create a Silverlight application and use this Workaround of using a WCF service.
You can find a MSDN Forum discussion of the same.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM