LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VIAssemblyException "Failed to call InitLVClient function."

If I try to call my LabView Interop Assembly in a .net framework 4.0 application I'll get an unhandled VIAssembly exception.

No problem with .net framework 3.5.

 

My config is LabVIEW2010SP1 and MS VisualStudio2010.

 

Can that be fixed ?

 

Best regards

Christian

 

 

 

0 Kudos
Message 1 of 9
(5,657 Views)

Christian,

 

LabVIEW does not support .NET 4.0 directly. Following this KB .NET Framework 4.0: LabVIEW 2010 did not undergo any testing using assemblies targeting the CLR 4.0.

Sure, the rest of the KB does not refer to your issue, but this sentence is important. I am not sure if this has been addressed with LV 2010 SP1, but regarding to your experience, i would say: No.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 9
(5,628 Views)

I just installed LabVIEW 2011, and I still get this problem "Failed to call InitLVClient function".  Did you ever figure this out?

0 Kudos
Message 3 of 9
(5,464 Views)

No, but I haven't installed the current LV version yet. It will take at least 2 weeks before I can test this again. Will post the result here.

 

So far I wrap the lvInteropAssembly to add COM functionality and this wrapped version is .net 4.0 compatible.

 

Christian

0 Kudos
Message 4 of 9
(5,452 Views)

I decided to just give up.  I'm implementing a vision development module project inside of a .NET 4 C# WPF application, so I ended up just putting all of my logic in C# rather than LabVIEW.

 

However, I am still interested in getting this to work for future projects, as I think this would be a really nice option... but it must work for .NET 4.0!

0 Kudos
Message 5 of 9
(5,441 Views)

I am running into the same problem.

 

I made a Interop Assembly in LabVIEW 2011 SP1 and am trying to integrate it into Visual C# 2010 (.NET 4.0).

 

I'm getting the same error as the OP.

 

What is the advised solution? I can't use a different version of .NET.

 

0 Kudos
Message 6 of 9
(5,220 Views)

Used LV 2011 SP1 , VS Studio 2010 ( Express ) .NET 4.0 and I get this message.

 

Is there any hope? 


0 Kudos
Message 7 of 9
(5,171 Views)

No.  LabVIEW does not yet support building an assembly for any version of the .NET framework later than 3.5.  See http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/building_a_net_assembly/ and http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/net_defaults/#compatible explaining that LabVIEW uses CLR 2.0, and the MSDN compatibility chart showing that .NET 4.0 uses CLR 4.0.

Message 8 of 9
(5,164 Views)

To use a simple wrapper class for the LV interop assembly functions is an acceptable solution. This can be referenced/used within a pure 4.0 project without the LVClient error. It works for me since the last 3years.

0 Kudos
Message 9 of 9
(5,143 Views)