Using PcapDotNet library from Github (https://github.com/PcapDotNet/Pcap.Net/wiki/Using-Pcap.Net-in-your-programs), I built a Windows Service that allows remote network sniffing for comms network troubleshooting. After deployment the service is unable to start.
On startup the Windows Event Log shows:
Service cannot be started. System.IO.FileNotFoundException: Could not load file or assembly 'PcapDotNet.Core.dll' or one of its dependencies. The specified module could not be found.
File name: 'PcapDotNet.Core.dll' at NewPcapService.svcPcapServer.ServiceStart
Following the guidelines in the pcapDotNet wiki page above, I built the project in release mode, and installed all the redistributable packages recommended.
The 'missing' file, PcapDotNet.Core.dll, is located with 3 other PcapDotNet DLLs in the same folder as the service EXE.
I also put a copy of all 4 DLLs in the Windows and Windows\System32 folders, all to no avail.
Can anyone help on this one? This library is at the core of some essential network tests we are designing for system troubleshooting.
Note that probably the file is not 'missing', but "one of its dependencies" probably is.
This is basically question 6 in the Pcap.Net FAQ.
Please make sure you follow all steps in Using-Pcap.Net-in-your-programs guide as it most likely will resolve your issue, like it did for several people before.