LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I move the location of dependancies?

It seems like when I build an application, its dependancies are dumped into a folder called "data" in the same directory as the .exe file. Is there a way for me to change where the application looks for its dependancies, say another folder in a different directory?
0 Kudos
Message 1 of 7
(3,318 Views)
Hi CLM,
You can right click on your application under Build Specifications, go to Properties.  Go to Destinations, and under Destinations, go to Support Directly, and on the right hand side, you can change the destination of the support directory.  Hope this information helps!

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
Message 2 of 7
(3,285 Views)
Well, moving the dependancies didn't have the effect I had hoped, but thank you for answering the question anyway.
0 Kudos
Message 3 of 7
(3,262 Views)
Is there a way for me to change where the application looks for its dependancies, say another folder in a different directory?

I sense some dissatisfaction with the results. What effect were you hoping for? Looks to me that Yi Y. had the perfect answer to your question.


Message Edited by Bill@NGC on 09-11-2007 09:51 PM

0 Kudos
Message 4 of 7
(3,260 Views)
Hi CLM,
Please feel free to ask if you have any questions, we are all here to help! Smiley Happy

I sense some dissatisfaction with the results. What effect were you hoping for? Looks to me that Yi Y. had the perfect answer to your question.

Bill, thanks you for the input Smiley Happy.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 5 of 7
(3,242 Views)
My application uses a .NET assembly which references other assemblies. It works when I don't build it into an executable, but not when I build it. It seemed to be looking for the other assemblies, but they can't be moved from their directory. Hence, I tried to change where it looked for dependancies to the directory where they are stored, but unfortunatly that didn't do the trick.
0 Kudos
Message 6 of 7
(3,221 Views)

Hi CLM,

When you build your VIs into an executable and those VIs happen to reference .NET assemblies, then you must obey the rules of .NET and understand how the .NET CLR locates assemblies.  .NET requires that all assemblies either live in the GAC or in the same directory, or subdirectory of the application. These requirement is based upon the fact of how the .NET CLR attempts to locate assemblies. I could go into detail about how .NET probes for assemblies, but it’s better if you take a look at Microsoft documents such as the MSDN article How the Runtime Locates Assemblies.

Anyway, with regards to LabVIEW, if you build some LabVIEW application called blah.exe, then the .NET assemblies it needs must either be in the GAC or in the same directory or subdirectory of blah.exe.

You need to consider these rules when configuring your applications properties. One suggestion is to add all your .NET assemblies to your LabVIEW project and make sure to copy them over into the data directory which is in a subdirectory of the application.exe directory. In this case, the .NET CLR will find those assemblies. Plus adding these assemblies to your project and setting them to copy over makes your life easier. This way you don't have to manually copy and paste your assemblies to some directory in your applications directory.

Hope this helps!

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 7 of 7
(3,204 Views)