LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

static .net assembly dependency load

Hi,

 

I am using LabVIEW 8.5. I have a .net dll named A.dll, which is dependent on another .net dll named B.dll. Now, i created a constructor node and selected the A.dll and the class. When i execute this, it throws error, "Could not load assembly B.dll". This B.dll is located in the same folder where A.dll is available. How to help this LabWindows application to find out the B.dll (dependent dll of A.dll) ?

 

Thanks

Selva

0 Kudos
Message 1 of 5
(3,077 Views)
0 Kudos
Message 2 of 5
(3,070 Views)

Hi,

 

Sorry!! That didnt help me.

I just want to know how to register the path of the (dependent) .Net assembly in LabVIEW 8.5 to pick up those dlls at runtime. or how to set the relative path in LabVIEW 8.5?

 

 

Thanks

Selva

0 Kudos
Message 3 of 5
(3,062 Views)
Assemblies are by default loaded by .Net only from the GAC or the directory where the current process resides. LabVIEW adds additional possibilities in that it registers the project directory as well as attempts to load an assembly with its fully qualified name if you pointed the .Net node to a specific .Net assembly. This last point obviously can't work for dependant libraries so the only directories that remain where .Net will look for your secondary DLL are in the GAC, in the executable directory (where labview.exe is located for the development environment) and in the project directory.
Message Edited by rolfk on 11-23-2009 03:23 PM
Rolf Kalbermatter
My Blog
Message 4 of 5
(3,052 Views)
This is what I was (about to be) trying to get at in the previous forum post. LabVIEW has a process called shadow copying, where it copies an assembly to a temporary location before it loads it. The end result is that the copy that's loaded is not next to the dependent file anymore.
Message Edited by Jarrod S. on 11-23-2009 09:51 AM
Jarrod S.
National Instruments
Message 5 of 5
(3,043 Views)