I am using Visual C# 2010 and I started a new Windows Forms Application project.
I added the References to the pcapdotnet.dlls in the project. And added the following using statements.
In the form I added a button and inside the button_click method added the following line of code to retrieve the list of devices on my machine. I was then going to send the information to a listBox component for selection.
IList<LivePacketDevice> allDevices = LivePacketDevice.AllLocalMachine;
I get the following error when I run the debugger and click the button.
FileLoadException was unhandled:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
What do I need to do to use pcapdotnet in a Windows Form Application project?
All the examples seem to always use the console type of application. Could you add an example that is as simple as what I am trying to do?