在的System.Net.Sockets ASP.NET框架DOTNET失踪? - ASP.NET vNext [英] System.Net.Sockets missing in ASP.NET dotnet framework? - ASP.NET vNext

查看:87
本文介绍了在的System.Net.Sockets ASP.NET框架DOTNET失踪? - ASP.NET vNext的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开场白:我做了一个网络类库,以支持ASP.NET vNext推出新的CLR 5.0,我需要使用的功能之一是的System.Net.Sockets的NetworkStream类。
我的问题是,不知何故,我不能引用的System.Net.Sockets在我的类库的Project.json文件。智能感知只有一个System.Net下建议和它的System.Net.WebHeaderCollection。我可以在我做测试的类库控制台应用程序的Project.json引用它。该类库使用DOTNET框架和控制台应用程序使用dnxcore50和dnx451框架,所以它可能是一个兼容性问题(但是从我个人理解,DOTNET,就是要对应用程序的更广泛的框架,需要支持所有的构架)。

Prologue: I made a "Web Class Library" to support the new CLR 5.0 introduced with ASP.NET vNext, and one of the features I need to use is NetworkStream class in System.Net.Sockets. My problem is that, somehow, I can't "reference" System.Net.Sockets in the Project.json file of my class library. Intellisense has only one suggestion under System.Net and it's System.Net.WebHeaderCollection. I can reference it in the Project.json of a Console Application I made to test the Class library. The class library uses the dotnet framework and the console application uses the dnxcore50 and dnx451 frameworks, so it might be a compatibility issue (but from what I understand, dotnet is meant to be a more broad framework for applications that needed to support all of the frameworks).

另外一个奇怪的问题,我注意到(蛋糕上的糖衣)是,每当我打开该项目新的(仅发生,如果Visual Studio是开放的新鲜为好,我猜是因为项目加载了?)对的NetworkStream和TcpClient的类显示蓝色文字,显示出他们的认可。如果我将鼠标悬停在他们,那就说明我自己的空间,就像他们是合法的。

Another weird issue I noticed (the icing on the cake) is that whenever I open the project fresh (only happens if visual studio is open fresh as well, I guess because the project is loading up?) the NetworkStream and TcpClient classes show in the blue text, showing that they're recognized. If I hover over them, it shows me their namespace, like they're legitimate.

如果有什么我能做的,请建议。我已经尝试过包恢复,重建,从CMD恢复包(为增加影响),试图从的NuGet安装包,并重新启动我的计算机和所涉及的所有程序。

If there's anything I can do, please suggest. I've already tried restoring packages, rebuilding, restoring packages from cmd (for added affect), attempting to install the package from nuget, and restarting my computer and all programs involved.

附件:


  • 的Project.json(S):HTTP:/www.pastebin.com/XjKsrgV9

推荐答案

您可以使用软件包搜索网站看有没有类型可用于CoreCLR。

You can use the Package Search website to see if a type is available for CoreCLR.

添加到 Sytem.Private.Networking 的参考。

这篇关于在的System.Net.Sockets ASP.NET框架DOTNET失踪? - ASP.NET vNext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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