System.Net.Sockets 在 WP8.1 项目中找不到
System.Net.Sockets not found in WP8.1 project
Brand new Windows Phone 8.1 C# 项目,VS2013 update 4. using System.Net.Sockets
行给出编译错误:
The type or namespace name 'Sockets' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
System.Net 程序集在“引用”对话框中不可用 - 它声称所有可能的程序集都已被引用。尝试浏览它会产生一条消息,表明该程序集已在项目中引用。
请问我遗漏了什么?
编辑:在明确针对 WP8.0 的项目中(模板称为 "Windows Phone Silverlight" 而不是 "Windows Phone"),相关命名空间可用。
简单回答:System.Net.Sockets
在 Windows Phone 8.1
上不受支持
改用Windows.Networking.Sockets
。此处提供文档:
https://msdn.microsoft.com/de-de/library/windows/apps/windows.networking.sockets.aspx
Brand new Windows Phone 8.1 C# 项目,VS2013 update 4. using System.Net.Sockets
行给出编译错误:
The type or namespace name 'Sockets' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
System.Net 程序集在“引用”对话框中不可用 - 它声称所有可能的程序集都已被引用。尝试浏览它会产生一条消息,表明该程序集已在项目中引用。
请问我遗漏了什么?
编辑:在明确针对 WP8.0 的项目中(模板称为 "Windows Phone Silverlight" 而不是 "Windows Phone"),相关命名空间可用。
简单回答:System.Net.Sockets
在 Windows Phone 8.1
改用Windows.Networking.Sockets
。此处提供文档:
https://msdn.microsoft.com/de-de/library/windows/apps/windows.networking.sockets.aspx