LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW .NET library doesn't load

Solved!
Go to solution

I have stumble upon an interesting behavior where .NET dll calls works when the applications' project file is opened. However it doesn't work when I try to run the application as standalone. The application is designed to run standalone and it is not path dependent. Only path dependent part is the .NET Constructor.

 

The error message is saying that it can't find the assembly files when I try to run the vi without opening the project. I have opened the vi and manually the mapped the *.dll directory using the .NET Constructor as you can see in the word document. I am still getting the same error message.

 

Is there a way to statically load the .NET Constructor? Maybe it will recognize all the dependencies that way. Any insight into this issue would be greatly appropriated. I did come across the following link, but it just made me even more confuse.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LDcSAM&l=en-US

 

I did further investigation and I found out when I run the VI in standalone, all the *.dll does not get loaded to the ".NET Assemblies in Memory" as shown in the attached document. I also added LabVIEW.exe.config file into the LabVIEW.exe directory as mentioned in the above link.

 

0 Kudos
Message 1 of 5
(3,342 Views)
Solution
Accepted by topic author Sam2009

That happened to me too, if memory serves i ended up placing the DLL in the .exe folder else it wouldn't be found. I think i had to move it similarly in the development too so the ref was the same.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 5
(3,297 Views)

IMO, a VI that belongs to a project should not be opened without the project, let lone run in that environment.  One consequence you have already discovered - it doesn't always load dependencies from the expected place.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 5
(3,287 Views)

Thanks Yamaeda for the suggestion. I will give this a go.

0 Kudos
Message 4 of 5
(3,260 Views)

I finally got the chance to build an executable of my program and copied all the necessary DLLs into the .exe folder. The program was able to open up all the .NET libraries and ran without any errors.

 

Off to my next adventure..

0 Kudos
Message 5 of 5
(3,201 Views)