03-03-2011 07:14 AM
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
03-04-2011 03:27 AM
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
08-23-2011 09:30 AM
I just installed LabVIEW 2011, and I still get this problem "Failed to call InitLVClient function". Did you ever figure this out?
08-24-2011 01:49 AM
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
08-25-2011 03:40 AM
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!
03-20-2012 01:34 PM
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.
03-30-2012 11:07 AM
Used LV 2011 SP1 , VS Studio 2010 ( Express ) .NET 4.0 and I get this message.
Is there any hope?
03-30-2012 01:09 PM
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.
04-02-2012 02:08 AM
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.