Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C# (http://www.programmingforums.org/forum16.html)
-   -   System.Net.Sockets Namespace Missing?? (http://www.programmingforums.org/showthread.php?t=14848)

mackay6 Jan 1st, 2008 8:22 PM

System.Net.Sockets Namespace Missing??
 
Hello all,

I've had to make this post because I'm totally perplexed as to how to make use of the sockets in C#.

I have installed on my Windows XP system, .Net Framework 1, 2, 3 and 3.5 yet within each of them it appears as though the System.Net.Sockets namespace cannot be found at all. The system compiles fine with just System.Net, but it can't seem to find the Sockets derivative within .Net -- not sure why this is happening and for the project I want to do I'm going to require sockets.

Any idea what I'm missing and or how to fix that, or perhaps something more that I require ontop of the normal Frameworks? This would really be appreciated.

Oh, and I'm using Visual C# Express 2008.

Thanks!

null_ptr0 Jan 1st, 2008 8:34 PM

Re: System.Net.Sockets Namespace Missing??
 
Invalid or missing assemblies.

mackay6 Jan 1st, 2008 8:35 PM

Re: System.Net.Sockets Namespace Missing??
 
:

Error 1: The type or namespace name 'Sockets' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)

Yeah, thats the error I'm getting back from the compiler. But I don't see how it can be missing, any ideas?

All VC# recognizes is PeerToPeer which is no good...

PhilBon Jan 1st, 2008 10:29 PM

Re: System.Net.Sockets Namespace Missing??
 
Quote:

Originally Posted by mackay6 (Post 138936)
Oh, and I'm using Visual C# Express 2008.

Chances are that's the problem. The Express Editions do not have every lib that Professional would. I have Pro and just created a new project and it worked fine.

xavier Jan 2nd, 2008 1:11 AM

Re: System.Net.Sockets Namespace Missing??
 
I have standard beta and it also worked.
Try adding by hand a reference to System.Net. - maybe it will work

xavier Jan 2nd, 2008 6:32 AM

Re: System.Net.Sockets Namespace Missing??
 
I tried at a friend that has express installed and it just worked :). so there must be an issue with your installation.

mackay6 Jan 2nd, 2008 9:04 AM

Re: System.Net.Sockets Namespace Missing??
 
Thanks for the replies folks, although I figured it out.. was so silly.. I just had to make a reference to System. Simply just using System is no good, you had to make the actual reference to it. Not sure why, but hey it works, so its all good. Thanks!

Alias Jan 2nd, 2008 9:13 AM

Re: System.Net.Sockets Namespace Missing??
 
PhilBon, what do you think the framework binaries have to do with VS? - Im intrigued to know what draws people to this conclusion.

PhilBon Jan 3rd, 2008 1:51 AM

Re: System.Net.Sockets Namespace Missing??
 
The Program and the framework binaries are connected through the IDE. If you mess something up in the IDE it wont properly connect to the Framework Binaries. So if a VS developer wanted to have some fun they could create a "System.HelloWorld" that wouldn't link to anything. Or during the install one of the links could have been corrupted so "System.x" might not link to the correct library. If that's understandable.

Jimbo Jan 3rd, 2008 3:53 AM

Re: System.Net.Sockets Namespace Missing??
 
The framework (and included libraries) are the same for the various versions of VS. It's the other features (e.g. code analysis, test framework, etc...) that separate them.


All times are GMT -5. The time now is 3:57 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC