找不到 WP 8.1 的 System.Net.Sockets 程序集 [英] Cannot find System.Net.Sockets assembly for WP 8.1

查看:29
本文介绍了找不到 WP 8.1 的 System.Net.Sockets 程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个应用程序,它可以作为我的音乐播放器的遥控器.我刚刚为我的代码编写了一个不错的库,我刚刚注意到没有名为 System.Net.Sockets for Windows Phone 8.1 的程序集?必须有解决方案,但我就是找不到.有谁知道我可以如何将它导入到我的项目中?

I'm trying to create an app which works as a remote-control for my musicplayer. I've just finished written a nice library for my code and I just now noticed there is no assembly called System.Net.Sockets for Windows Phone 8.1? There must be a solution to this, but I just cannot find it. Does anyone know how I might be able to import it to my project?

推荐答案

根据 Microsoft,您应该使用 Windows.Networking.Sockets 代替:

According to Microsoft, you should be using Windows.Networking.Sockets instead:

Windows 运行时 API Windows.Networking.Sockets 已被采用适用于 Windows Phone 8.它已作为 Windows Phone 实现运行时 API,使其易于在任何支持的编程中使用您选择的语言.虽然我们增强了 .NET API,System.Net.Sockets,支持更多特性,如IPv6和监听器套接字,您应该考虑使用新的 API 进行套接字编程因为它比 .NET API 更具可移植性.Windows.Networking.Sockets 是从头开始构建的执行最佳做法的干净、安全且易于使用的 API.

The Windows Runtime API, Windows.Networking.Sockets, has been adopted for Windows Phone 8. It has been implemented as a Windows Phone Runtime API, making it easy to use in whatever supported programming language you choose. Although we've enhanced the .NET API, System.Net.Sockets, to support more features such as IPv6 and listener sockets, you should consider using the new API for sockets programming because it is more portable than the .NET API. Windows.Networking.Sockets has been built from the ground up to be clean, secure, and easy-to-use APIs that enforce best practices.

在 WinRT 中,这是您需要做的.这是对相关问题的答案以供进一步阅读.

In WinRT, this is what you need to do. Here's an answer to a related question for further reading.

这篇关于找不到 WP 8.1 的 System.Net.Sockets 程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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