我想在我的 C# 项目中使用 Pcap.Net。我下载并添加对项目的 .dll 引用。
该项目成功构建,但是当我运行它时,出现以下异常。
System.IO.FileNotFoundException was unhandled
Message=Could not load file or assembly 'PcapDotNet.Core.dll' or one of its dependencies. The specified module could not be found.
Source=trafcon
FileName=PcapDotNet.Core.dll
FusionLog=""
StackTrace:
at ObtainingTheDeviceList.Program.Main(String[] args)
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
我该怎么办?