LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET DLL: System.IO.FileNotFoundException for Dependent DLL

Solved!
Go to solution

Hello, I am attempting to write my own C# .NET DLL that interfaces with a USB Camera.  The camera manufacturer has an SDK, that provides a DLL called FlyCapture2Managed_v140.dll.  Now, since my C# DLL will depend on this DLL, I am able to add it as a reference into my C# .NET Class Library project, and compile it into CameraController.dll.  However, when I copy both CameraController.dll and FlyCapture2Managed_v140.dll into my LabVIEW project (both the project folder on the hard drive and the project itself), and I try to create a .NET constructor node, I get the following error.

 

Error Code 1172
Constructor Node Error creating instance of CameraManager in assembly CameraController.CameraManager, CameraController, Version=1.0.6170.30874, Culture=neutral, PublicKeyToken=null, (System.IO.FileNotFoundException: Could not load file or assembly 'FlyCapture2Managed_v140.dll' or one of its dependencies. The specified module could not be found.) <append> <b>System.IO.FileNotFoundException</b> in Setup Camera.vi 

How do I get LabVIEW to recognize this dependent DLL?  What am I doing wrong?

0 Kudos
Message 1 of 2
(5,314 Views)
Solution
Accepted by topic author airoll

Hey airoll,

 

This behavior typically happens because LabVIEW had problems calling the DLL that is called by the DLL.  To normally resolve this having LabVIEW load the second DLL even though it does not directly interact with it should allow the constructor to be loaded.

 

-Ryan

Applications Engineer

Ryan
Group Manager
FlexLogger
NI R&D
0 Kudos
Message 2 of 2
(5,256 Views)