3

I'm trying to create a universal windows platform c# program that includes a network map.

UWP c# doesn't include any built in pinging tools and system.net.pinging won't install. How can I ping using the windows.network.sockets namespace to find out what computers are on the network (and their MAC address, hostname and hopefully operating system).

Shweta Pathak
  • 775
  • 1
  • 5
  • 21
Adam Dernis
  • 530
  • 3
  • 14

1 Answers1

2

System.Net.Ping 4.0.0 Provides the System.Net.NetworkInformation.Ping class, which allows an application to determine whether a remote computer is accessible over the network.

Add the System.Net.Ping NuGet package to your project using

Install-Package System.Net.Ping -Version 4.0.0

in Package Manager Console

Community
  • 1
  • 1
Mohit S
  • 13,723
  • 6
  • 34
  • 69
  • Doesn't work here's the error: Install-Package : Project 'Default' is not found. At line:1 char:1 + Install-Package System.Net.Ping -Version 4.0.0 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Default:String) [Install-Package], ItemNotFoundException + FullyQualifiedErrorId : NuGetProjectNotFound,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand – Adam Dernis Nov 10 '16 at 03:47
  • I can install others – Adam Dernis Nov 10 '16 at 04:17
  • I did and tried to upvote your answer but I don't have the reputation – Adam Dernis Nov 10 '16 at 04:25
  • 1
    Actually there is some issue with Ping NuGet. See [System.Net.Ping NuGet Installation error](http://stackoverflow.com/questions/40538754/system-net-ping-nuget-installation-error) asked just 2 hours ago. – Mohit S Nov 11 '16 at 01:34