NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
bo.madsen
Posts: 2
0 Kudos
Accepted Solution

Using a .net element from a SDK in labview application

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
Member
christian_w
Posts: 160
0 Kudos

Re: Using a .net element from a SDK in labview application

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

 

Knight of NI
Posts: 18,064
0 Kudos

Re: Using a .net element from a SDK in labview application

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. 

Member
bo.madsen
Posts: 2
0 Kudos

Re: Using a .net element from a SDK in labview application

Thanks guys

 

 I tried Smercurio_fc solution and it worked!

 

Thanks again!

Member
pierroil
Posts: 101
0 Kudos

Re: Using a .net element from a SDK in labview application

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.

 

Knight of NI
Posts: 18,064
0 Kudos

Re: Using a .net element from a SDK in labview application

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

Member
pierroil
Posts: 101
0 Kudos

Re: Using a .net element from a SDK in labview application

It worked, it was a driver problem actually! 

 

But yeah I figured that Labview had no control.

Thanks

 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page