PlsBroSendHelp
PlsBroSendHelp

Reputation: 643

System.Net.Sockets missing in ASP.NET dotnet framework? - ASP.NET vNext

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).

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.

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.

Attachments:

Upvotes: 1

Views: 1585

Answers (1)

Victor Hurdugaci
Victor Hurdugaci

Reputation: 28425

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

Add a reference to Sytem.Private.Networking.

Upvotes: 1

Related Questions