From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reference .NET assembly that may be in different folders on different machines?

I have a .NET dll that is stored in the System32 directory of windows. On some machines this can be found at C😕windows/System32 and on other machines at C😕winNT/system32. I do not have administrative rights on all PC's and running the GACUtil exe does nto seem to make that much difference.

 

The dll is referenced and works on all machines that are C😕Windows/System32. But requires a rebuild on machines that are C😕WinNT/System32.

 

Is there any way so programatically find the dll and Reference it.

 

I have been playing around with an idea as shown below.

 

1.jpg

The only problem here is the .NET reference still requires me to choose the .NET library from the machine on which I am working at or else I cannot see the methods.

 

2.jpg 

 

The question arises that is this going to work, or is there an easier way that I haven't figured out yet?

 

Any ideas would be greatly appreciated.

0 Kudos
Message 1 of 2
(2,381 Views)
Why would you store a .NET assembly in the system32 folder? .NET assemblies aren't like DLLs. I think the best solution is to include the assembly with the application so you always know where it is. The best place to put them is in the "data" directory which is the default directory for the "Support Directory" in a project's build options. See How LabVIEW Locates .NET Assemblies and How the Runtime Locates Assemblies.
0 Kudos
Message 2 of 2
(2,373 Views)