【发布时间】:2019-02-09 23:44:33
【问题描述】:
使用来自 Github (https://github.com/PcapDotNet/Pcap.Net/wiki/Using-Pcap.Net-in-your-programs) 的 PcapDotNet 库,我构建了一个 Windows 服务,它允许远程网络嗅探以进行通信网络故障排除。部署后服务无法启动。
在启动时,Windows 事件日志显示:
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
按照上面 pcapDotNet wiki 页面中的指南,我在发布模式下构建了项目,并安装了所有推荐的可再发行包。
“缺失”文件 PcapDotNet.Core.dll 与其他 3 个 PcapDotNet DLL 位于与服务 EXE 相同的文件夹中。
我还将所有 4 个 DLL 的副本放在 Windows 和 Windows\System32 文件夹中,但均无济于事。
有人可以帮忙吗?该库是我们为系统故障排除而设计的一些基本网络测试的核心。
【问题讨论】:
标签: c# windows service pcap.net