Issues with deploying Pcap.Net application to another machine

Sep 7, 2010 at 10:48 AM
Edited Sep 7, 2010 at 1:37 PM

Hi,

I've built an application using Pcap.Net 0.7.0 with WinPcap 4.1.2 and Visual Studio 2010 running on Windows 7 32 bit.

I've then deployed the application on another machine (Windows 7 32bit with WinPcap 4.1.2 and .Net v4) along with all the Pcap.Net dll's. The application exe, my library dll's and the Pcap.Net dll's are all in the same directory. When I try to run my application on the new machine I get the following error.

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'PcapDotNet.Core.dll' or one of its dependencies.
 The specified module could not be found.
   at Utils.PacketCaptureAgent..ctor()
   at Program.CaptureEngine.Capture()

I've tried copying the files over manualy, I've bundled them up with a Setup/Installer project but I keep on getting the same error. Everything works fine on the original machine.

Any ideas?

-Stephen

Coordinator
Sep 7, 2010 at 11:11 AM

Hi,

Can you try using Dependency Walker (http://www.dependencywalker.com/) on PcapDotNet.Core.dll and see if it shows any missing dlls?

Boaz.

Sep 7, 2010 at 2:11 PM

Thanks for the reply.

I'm seeing 3 missing dependencies with that.

MSVCP100.dll, MSVCR100.dll, IESHIMS.dll, although IESHIMS is missing on my working machine as well, so it doesn't seem to matter.

 

I've installed the .Net v4 Framework so I thought that would have covered these dependencies, but these appear to be part of the Visual C++ 2010 which gets installed as part of Visual Studio on my development machine. Have you seen this issue before?

Coordinator
Sep 7, 2010 at 2:16 PM

I have seen this issue in the past (unrelated to Pcap.Net).

See Redistributing Visual C++ Files on Microsoft's MSDN:

http://msdn.microsoft.com/en-us/library/ms235299.aspx

Let me know if this helps you.

Boaz.

Sep 7, 2010 at 2:37 PM

Ok, that fixed the issue. So just so that it's recorded here Pcap.Net is dependent on Visual C++ 2010, .Net v4 Framework and WinPcap.

Thanks for the help.

Coordinator
Sep 7, 2010 at 3:46 PM

I've added this information to the user guide:

http://pcapdotnet.codeplex.com/wikipage?title=Using%20Pcap.Net%20in%20your%20programs