1

I want to use NetworkInformation namespace and when I use system.net.networkInformation I'm getting error: "The type or namespace name 'NetworkInformation' does not exist in the namespace 'System.Net' (are you missing an assembly reference?) "

I'm compact framework v2.0 or 3.5. compact framework should support networkInformation namespace?

I also tried to use this code:

Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "ipconfig.exe";
p.Start();
p.WaitForExit();
string output = p.StandardOutput.ReadToEnd();
return output;

but the StandartOutput and redirectStandartoutput doesn't exist.

I'm trying to find out is the LAN is up or down. There is other way that I can use with compact framework?

janneob
  • 959
  • 2
  • 11
  • 25
  • 1
    The `Compact-Framework` only has a small subset of the full framework. –  Dec 18 '12 at 13:56

1 Answers1

3

You can do this with OpenNetCF's Smart Device Framework. I've used classes in this framework on several occasions when I find they are missing from CF2.0

See @ctacke's answer here:

The easiest way is to use OpenNETCF's SDF and look at the OpenNETCF.Net.AdapterStatusMonitor class, which will raise events when NDIS sends out notifications (like MEDIA_CONNECT and MEDIA_DISCONNECT).

Community
  • 1
  • 1
Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
  • I'm getting the exception: PublicKeyToken= ... or one of it's dependencies, was not found." I downloaded the dll but I can't find the license. what should I do? – janneob Dec 17 '12 at 08:39
  • I'm getting the exception: An unhandled exception of type 'System.PlatformNotSupportedException' occurred in OpenNETCF.Net.dll Additional information: Connection Manager API is not supported under this platform. I need to add to the SDK this dlls? – janneob Dec 17 '12 at 11:26