LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error in built LabVIEW application using .NET assemblies

Hello,

 

So in the development environment I can run my application just fine, Looking at the '.NET Assemblies in Memory' window shows me this:

 

Assemblies.png

 

Great.

 

I can then build my application into an exe. It puts the assembly DLLs in a data directory with the exe - great this is where LV help says they should be.

 

However when call the .NET LV code (by mouse click) I get the following message:

 

Error.png

 

Not so great. (the error window is part of my own error handling)

 

I've tried copying the DLLs out of the data directory and to simply in the app directory but to no avail.

 

There can't be any other dependancies as they would show up in the .NET Assemblies in Memory window when in dev environment... right? Even so, Telemakus ship no other DLLs with their drivers so any other dependancy must be in the GAC I guess.

 

One thing that has foxed me is that the error points to missing version 1.2.0.21027 - this does not match the versions I see in the Assembles in Memory Window. Maybe something to do with it?

 

Any help much appreciated.

 

Thanks

 

 

Nick C.

Cardiff University
0 Kudos
Message 1 of 6
(2,822 Views)

One solution is to use a GAC registered DLL. This will be found by default.

Another workaround is to set the support directory within the application builder to the exact location where you want to have it in the runtime environment. This path will be searched!!!

In addition: If the .nett dll calls other DLL's they should be GAC registered or for non .net DLL's, located in system directories like system32.

 

 

Hope it helps

Christian

0 Kudos
Message 2 of 6
(2,771 Views)

I really didn't want to register the DLLs in the GAC - adds a headache to distribution.

 

I get this error even if I leave all the built files exactly where the application builder puts them.

 

I do wonder if it is some dependancy I am missing. As far as I can tell there isn't - is there anyway of finding out for sure?

 

Thanks for your ideas!

0 Kudos
Message 3 of 6
(2,763 Views)

DebugView may be able to provide more details:

 

http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 6
(2,756 Views)

I can tell you for sure that if you specify the path in the app builder under Destination->Support Directory, this path will be searched under runtime conditions and the assembly will be found. It took us hours to figure out and it works like search path setting. We use an Visual Studio Installer to deploy the GAC registered LabVIEW InteropAssembly which calls 3rd party assemblies (GAC registered and unregistered with enclosed COM calls).

 

The other thing is the wrong version. Probably you work with different versions of the same DLL. You have to be sure to deploy the referenced version. If you have mixed calls (both versions referenced) to the RF switch assembly you should use a policy file to point to the latest version because you can't have both in the search path.

 

Hope it helps

Christian

 

0 Kudos
Message 5 of 6
(2,746 Views)

It must be a versioning issue then as the path is specified.

 

This is further backed up by the error showing me an errant version number.

 

What I don't understand is that these assemblies must be the correct version. To make sure, I copied the DLLs from their location shown in the project into the support directory.

 

Furthermore, the version numbers shown in the error have never been made by the manufacturer and are not even close to the ones shown in the .NET assemblies window.

 

Very confused.

 

Thanks anyway!

0 Kudos
Message 6 of 6
(2,727 Views)