LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a .net element from a SDK in labview application

Solved!
Go to solution
Hi guys, this is my first post here.

Ok, at the company where I work we have a Leice microscope system and I've made a functioning program in Labview 8.2.1 that is able to utilize the leice application suit SDK to control the microscope system. Now, I want to build an executable application from this VI I've made using the application builder, and here I run into trouble.
In my VI I'm linking to the SDK assemble by a Constructor node and when I build my executable the Application builder takes the assembler and put it in the data folder of the build. I'm not quite sure how this works, if the assemble needs some support files from it native folder, but the result is that my executable doesn't work.

My question is: Since the LAS SDK is installed on the machine that the executable is going to be used on, is there a way to link to the SDK .net assemble so that Labview will look for the assemble at its native folder and not put it in the data folder of the build?

Any help is greatly appreciated
0 Kudos
Message 1 of 7
(3,663 Views)

The problem seems to be that the LAS SDK .net assembly is not GAC registered. Therefore a copy will be generated in your build folder.

 

Try this

 

1) If the LAS SDK .net assembly is strong name key signed you can register it yourself using the gacutil cmd from the MS SDK.

 

2) If it's not signed  try to disassemble it with ildasm and re-assemble and sign it with ilasm

 

Hope it helps

Christian

 

0 Kudos
Message 2 of 7
(3,650 Views)
Solution
Accepted by topic author bo.madsen

It's being placed into the Data folder because it shows up in the list of dependencies, and the data folder has a default target of being in the location where the application is created. The reason why it doesn't work in the app is that there is a dependency. One or more other .NET private assemblies from the folder where the one you're using is are required.

 

The .NET Runtime (CLR) is what is responsible for finding .NET assemblies, so LabVIEW doesn't have anything to do with finding other assemblies. In this respect, .NET has specific rules it follows on locating assemblies

 

The simplest solution to your problem is to include all the .NET assemblies from that folder into your project. That way they can get copied into the data folder when you build the project. 

0 Kudos
Message 3 of 7
(3,625 Views)

Thanks guys

 

 I tried Smercurio_fc solution and it worked!

 

Thanks again!

0 Kudos
Message 4 of 7
(3,607 Views)

Hi,

 

I'm having the same problem.

 

Unfortunatly when I include the entire folder (containing all the DLL and system files I need) it doesn't work.

 

Is there a simple way to reference a .dll file from the computer instead of having it in the data folder? I installed a driver that comes with a .dll and it would be easier to have my application reference the location where that .dll resides. It's working on my development computer but now on my deployment computer.

 

0 Kudos
Message 5 of 7
(3,350 Views)

As noted, LabVIEW has no control over this. This is purely under the control of .NET. You could install this assembly in the GAC.

0 Kudos
Message 6 of 7
(3,346 Views)

It worked, it was a driver problem actually! 

 

But yeah I figured that Labview had no control.

Thanks

 

0 Kudos
Message 7 of 7
(3,343 Views)