I have to establish a device Comunication using a .Net 6 Librarry.
I know I can't reference it directly, and so I thought I write my own Wrapper in .Net Standard 2 or .net Framework
My wrapper works, if I try to use it from a Console Application
In LabVIEW i get following Error:
Constructor Node Error creating instance of WrapperTest in assembly WrapperFrameworkTest.WrapperTest, WrapperFrameworkTest, Version=22.214.171.124, Culture=neutral, PublicKeyToken=null, (System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)) <append><b>System.IO.FileLoadException</b> in Hudson PH Meter.lvlib:Hudson PH Meter.lvclass:Hundson Wrapper Test VI.vi
To solve this problem, I thought I check where my Test Console application(s) looking for System.Runtime, Version=188.8.131.52
Followed up by a lot of confusion.
Trying to download 184.108.40.206 as Labview persists on using that version. -> It dosn't exist in nuget : /
Anyone any experience on how to solve this?
In C# .NET it says it is fine to use a .NET 6 dll in .Net-Standard /Framework Applications. LabVIEW says it is fine to use .NET-Standard /Framework is this still true if i nest a .net 6 within?
This error may be caused for different reasons. I have attached articles that can give solutions in this case.
The first thing that I would like to mention is .NET Framework Version compatibility with LabVIEW.
If I have noticed right, you are using LabVIEW 2019, therefor the compatible .NET Framework version is 4.6.2.
I didn't find any other compatibilities documents to ensure that 220.127.116.11 version is compatible.
Also, I have found article about Error Loading .NET Assemblies in LabVIEW, try to go through this article to find an appropriate solution or hint.
Best way to thank is to give Kudos / Mark as a solution.