I was coding a simple console application in Visual Studio 2010. When I started debugging it, this error was shown and the output executable was moved to chest. Here is the code for the application that I was trying to make.
Imports System.Net.NetworkInformation
Module Module1
Sub Main()
AddHandler NetworkChange.NetworkAddressChanged, AddressOf AddressChangedCallback
Console.WriteLine("Listening for address changes. Press any key to exit.")
Console.ReadLine()
End Sub
Private Sub AddressChangedCallback(ByVal sender As Object, ByVal e As EventArgs)
Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
Dim n As NetworkInterface
For Each n In adapters
Console.WriteLine(" {0} is {1} Address: {2}", n.Name, n.OperationalStatus, n.GetIPProperties.UnicastAddresses(0).Address.ToString)
Next n
End Sub
End Module