LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Constructor assembly NET "could not load file or assembly 'xxx, Version=1.0, Culture=...' "

Hi,
      A co-worker has provided an assembly (DLL) for use under LabVIEW (right now I'm using LV7.1)
I can browse the namespaces and objects of the DLL, but, after selecting an object and running the VI, the constructor throws the following error:
"
Could not load file or assembly 'MydotNETDLLname, Version=1.0.1234.12345, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. in MydotNETDLLTest.vi
"
It looks like LabVIEW is trying to resolve a CSV string of values as a filename(?)
 
Any help is appreciated!
Cheers.
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 1 of 5
(3,538 Views)
Did you (a) place the .NET assembly in the same directory as the top-level VI, and (b) add a reference to the .NET assembly (it's under the Tools menu)?
Message 2 of 5
(3,526 Views)


@smercurio_fc wrote:
Did you (a) place the .NET assembly in the same directory as the top-level VI, and (b) add a reference to the .NET assembly (it's under the Tools menu)?


Hi smercurio,
      Thank you for replying Smiley Happy
 
      (a) No, having selected the assembly from the "Select .NET Constructor" browser, I , ahem, assumed it and it's location were already known to the OS and LabVIEW(?)   ... but I'll try this ASAP!
 
      (b) Yes!
 
FWIW: Since posting this, I've learned a LabVIEW 8.2 station is happy with the same assembly... 
 
Thanks, Cheers!
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 5
(3,516 Views)
That's because LabVIEW 8.2 treats .NET assemblies differently. It uses relative paths, so the assembly need not be in the same directory as the top-level VI. Also, there is no reference registration required in 8.2.
Message 4 of 5
(3,509 Views)

Hi Smercurio,

      Followed your advice and got the LV7.1 VI working by copying the VI to registered location of  DLL.  Also tried copying DLL to location of VI, but that didn't seem to work (maybe I needed to "register" the assembly's new location?).  Sorry, stars were way over-due!

Cheers.

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 5 of 5
(3,438 Views)