LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a .NET interop assembly in Linux

I'm new to the LabVIEW. In my build specifications, I don't get the option .NET interop assembly in Ubuntu 20.04. Is it possible to create it in Linux

0 Kudos
Message 1 of 6
(211 Views)

LabVIEW does only have .Net Framework support so far which is Windows only. .Net Core, and with that specifically .Net 8.0 is under development and expected to arrive in one of the next releases but support under Linux may be a version later.

Rolf Kalbermatter
My Blog
Message 2 of 6
(189 Views)

I'd like to add that the .NET assemblies that LabVIEW does make (e.g. on Windows) are only wrappers around compiled LabVIEW code.

 

As it is, and I don't see this change soon, LabVIEW is not able to make a .NET only assembly.

 

The .NET assemblies will only work on the target they are made on, and only if the correct run time engine is installed. 

0 Kudos
Message 3 of 6
(139 Views)

wiebe@CARYA wrote:

 

The .NET assemblies will only work on the target they are made on, and only if the correct run time engine is installed. 


The way you formulated that might sound more restrictive than it is. Yes LabVIEW creates an archive of the compiled VIs and then creates a .Net wrapper invoking the according .Net compiler which loads that archive and hands it over to the LabVIEW runtime engine to execute.

 

While the .Net wrapper would be in IDL, the embedded VI archive is in machine compiled LabVIEW VIs. As such it is very much like a mixed mode .Net assembly, where part of the assembly used to be .Net IDL code and part was compiled machine code (usually from C++ programming). The compiled machine code makes the .Net assembly either 32-bit of 64-bit compatible and therefor only loadable by an application using the same bitness.

 

As long as the calling application is using the same bitness that was used to create the LabVIEW .Net assembly, and the target machine has the according .Net Framework version and LabVIEW runtime version installed, it should work on any target.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 6
(123 Views)

@rolfk wrote:

As long as the calling application is using the same bitness that was used to create the LabVIEW .Net assembly, and the target machine has the according .Net Framework version and LabVIEW runtime version installed, it should work on any target.


It won't run if the OS doesn't match either. Which is Windows only as it is, but in the future, a 64 bit LabVIEW assembly build on Windows won't run on Linux even if the 64 bit RTE was installed.

 

Depending on the compile settings ("allow run in future versions...") it might run in a newer RTE version..

 

EDIT: Actually not sure, I don't do Linux that much. But I doubt a compiled VI (e.g. without diagram) created on Windows would run on Linux.

0 Kudos
Message 5 of 6
(117 Views)

Most likely it won’t, since the Windows ABI is not the same as on Linux. Purely from a LabVIEW runtime and .Net Core point of view it could work, but the binary compiled code also needs to adhere to the ABI and that makes things incompatible.

Theoretically LabVIEW could instead use an .Net IL backend for its LLVM compiler and in that way create architecture independent binary resources that any IL capable framework could execute. Practically there are many difficulties with that, so not sure that ever will happen.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(108 Views)