LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net 8 labview 2025

Solved!
Go to solution

i have dll build on .net 8 framework i want to accees it from labview 2025. I installed the lattest labview version 2025. Which says it support .net 8 assembly. But while connecting that dll in constructor node. it says error occured trying to load the assembly. what the solution for that.

0 Kudos
Message 1 of 10
(745 Views)

LabVIEW 2015Q1 has support for some .Net 8 features but by far not all. And it may never have support for for instance methods with template datatypes, just as the .Net support in previous LabVIEW versions. At this time .Net 8 support in LabVIEW while present has a good chance to not work for your more complex .Net assmblies.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 10
(728 Views)

Hello,

  • Can you call/open any other .NET constructor? (Not the constructor of the DLL you created)
  • Do the 32/64-bit version of LabVIEW and your DLL match?
  • Does your DLL have dependencies?

 

0 Kudos
Message 3 of 10
(724 Views)

no dll is very simple with has one function that returns string 'Test'

0 Kudos
Message 4 of 10
(714 Views)

And can you provide the entire project with sources?

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 10
(701 Views)

here is the three dlls and i wnat to connect to discoverprinter.dll can you give me code using constructor node

Download All
0 Kudos
Message 6 of 10
(668 Views)

The "error occurred trying to load the assembly" is a thing that can happen for at least 10 different reasons and it's annoying that LabVIEW doesn't even give a hint as to why it can't load it.

 

Possible reasons include:

 

  1. The DLL isn't a .NET DLL, it's an old style DLL
  2. The DLL is a version of .NET later than your version of LabVIEW supports
  3. The DLL is the wrong bitness (it's 32 or 64 only, the opposite of whatever LabVIEW version you are running)
  4. The DLL is blocked on your PC because it's untrusted (you might need to right-click on the DLL in Explorer, select Properties, then see if there's an "Unblock" option there)
  5. The DLL itself is corrupted on disk
  6. The DLL works, but it's missing a dependency
  7. The DLL works, but one of its dependencies is in the wrong place
  8. The DLL works, its dependency is in the right place, but the dependency has one of the other listed problems
  9. Everything should work but you need to set up a ".config" file for either LabVIEW.exe or your project file to enable a .NET option to actually make it work
  10. Some other new problem I haven't heard of or can't remember

 

Message 7 of 10
(618 Views)

Here i attach two simple dll with code it has and it is build on .net 8 and .net 4.8 framework build spec is any cpu.

 

Public Class MathHelper

Public Shared Function AddNumbers(a As Integer, b As Integer) As Integer
Return a + b
End Function
End Class

 

if I call this dll using constructor node in labview 2025 it shows an error occured trying to load assembly.

 

but than I  build this dll in .netframwork 4.8 it works in labview 2025.

 

as per 2025 Q1 release says it support .net 8 aasemblies. but it is not supporting. what is the issue here i attach both dll.

need help

Download All
0 Kudos
Message 8 of 10
(600 Views)
Solution
Accepted by topic author D1140

@D1140 wrote:

 

as per 2025 Q1 release says it support .net 8 aasemblies. but it is not supporting.


Yes, it is supported.

 

Step by step from the scratch, using Visual Studio Professional 2022 v.17.13.6:

 

image-20250417082424314.png

 

image-20250417082546767-1744871147673-1.png

8.0:

image-20250417082617742.png

 

as you wanted:

 

image-20250417083011480.png

 

Then using LabVIEW 2025 Q1 (64-bit) v.25.1.2f2:

 

image-20250417083109347.png

 

image-20250417083158734.png

 

image-20250417083301560.png

 

image-20250417083407779.png

That is.

Message 9 of 10
(585 Views)

Its working thank you for the solution. Here i am not selecting .net core constructor. thats why i faced issue.

0 Kudos
Message 10 of 10
(575 Views)