LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set position of DLL for .net-refnum?

Hello,

i have a .Net-dll which is inserted in my vi as a .net-refnum.

For this i inserted a  .net-refnum and then righclick and then "Select .Net-class" + Browse.

Then i browse to my dll and select the class in it.

 

The question is now: How can i set the position/path of this DLL?

Currently the DLL is in C:\files, but when i rename the directory to c:\data then the DLL is not found.

One solution would be to set a search path to the directory, but i want to set the path manually via parameters.

Is this possible?

 

Thx

0 Kudos
Message 1 of 8
(3,402 Views)

Hi OnlyOne,

can you show what you mean, please?

 

Try to help.

Mike

Message Edited by MikeS81 on 01-28-2009 04:52 PM
0 Kudos
Message 2 of 8
(3,400 Views)

Perhaps the attachment makes it clearer.

thx for your help

0 Kudos
Message 3 of 8
(3,395 Views)
When you reference a .NET assembly and save the VI, the path to the assembly gets saved with the VI. If you rename the directory then obviously LabVIEW won't be able to find it. Why would you think it would be able to? You can either keep the assembly in the same directory as the VI, or install the assembly into the GAC. See How the Runtime Locates Assemblies.
0 Kudos
Message 4 of 8
(3,377 Views)

>Why would you think it would be able to

 

I dont think labview is able to find it.

Thats why i ask how i can sepecify the path to the reference.

When i can pass the pass then LV knows where to search.

0 Kudos
Message 5 of 8
(3,358 Views)
If the path to the assembly was saved with the VI and you remove the directory, then how is LabVIEW supposed to be able to find the new location "automatically"? Please read this document: How LabVIEW Locates .NET Assemblies. You will need to work within these constraints.
0 Kudos
Message 6 of 8
(3,355 Views)

Do you know where is the position of the GAC in Windows XP?

Thx

0 Kudos
Message 7 of 8
(3,352 Views)
Normally it's C:\Windows\Assembly. However, you cannot simply copy an assembly into the GAC. First, it must be a strongly named assembly. Then, you either have to use gacutil, or the development environment to install the assembly. See here: Working with Assemblies and the Global Assembly Cache.
Message 8 of 8
(3,334 Views)