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: 

Unable to determine the install root path for the LabVIEW Runtime Engine

Hi,

 

i have an issue with using a LabVIEW interop assembly in a .NET application. I get an exception "Unable to determine the install root path for the LabVIEW Runtime Engine" when calling the assembly.

 

The little test program is attached below. It's called dotNETHost.exe. If you excecute the programm a dialog with an button appears. Clicking the button shall open another dialog (the LabVIEW Interop component). But the only thing I get is the exception message. The ZIP folder also contains the complete exception meassage (ExceptionMessange.jpg & ExceptionDetails.txt).

 

The Interop Assembly was built with LabVIEW 2011. We use Visual Studio 2010 and .NET 4.0.. The dotNETHost.exe.config file is prepared as mentioned in Knowledge base - Loading .NET 4.0 assemblies.

The Interop assembly contains only one simple dialog (loop is finished by clicking OK) without calling any other VIs or other DLL's.  In case of this there's also no support directory generated by the build process.

 

I have no idea why it doesn' work. I hope anyone can help me.

 

Thanks in advance

Kay

0 Kudos
Message 1 of 6
(3,730 Views)

This may be unrelated, but Labview and .Net4.0 dont work well together. Not yet anyway. I had to compile my assembly in 3.5 to get it to work.

Please read the following:

http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/configuring_clr_version/

http://digital.ni.com/public.nsf/allkb/32B0BA28A72AA87D8625782600737DE9

http://digital.ni.com/public.nsf/allkb/2030D78CFB2F0ADA86257718006362A3?OpenDocument


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 6
(3,719 Views)

Hi Kay,

any success with your issue? I am experiencing the same error. I use .net 2.0, but I still get it.

 

I use LabVIEW 2011 and VS 2012.

I would appreciate any help with this issue.

 

Thanks,

Zoli

0 Kudos
Message 3 of 6
(3,688 Views)

I have found the soulution for my problem.

The .net app was targeted at multi-cpu. It looks like that in this case LV does not know which runtime to load. I choose x86 target CPU, and magic, everything runs fine Smiley Happy

 

Here a link with more informations:

http://lavag.org/topic/15593-calling-dlls-made-in-labview-2011-in-visual-c-net-40/

0 Kudos
Message 4 of 6
(3,684 Views)

I am still having this issue in 2020.

I use visual studio 2017, compiled my program in x86.

 

Labview is Labview2019, runtime engine is Labview2019, both 32-bit.

 

The labview dll was created in the .NET framework

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

I have tried creating a LabVIEW.exe.config

 

<configuration>
<startup>
<requiredRuntime version="v3.5"/>
</startup>
</configuration>

 

with this inserted, but when I build my .NET dll in Labview and then load the reference into C#, it still appears as "runtime version v4.0.30319"

 

I can not seem to figure out how to force Labview to compile the .NET dll in 3.5 framework. I've tried the links, but most of them are how to get .NET to work in labview, not vice versa

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