09-25-2025 06:28 AM
Hi all,
I currently investigate the option to migrate one of our .Net libraries to .NET Core 8.0. In the process, I found some Bugs, Workarounds and Show-Stoppers, I would like to discuss.
First notable is the obvious and not documented incompatibility of "to more specific class" with .net objects. It will not accept any wire with .Net Core objects:
This can be somewhat worked around by using "Cast Type" and a "NaN/Path/Refnum" Check, which seems to work ok:
Another bummer is, that parameters / outputs with type DateTime / Timestamp seem to be broken. At runtime, the signature of the method with inputs is not recognized and returned timestamps are always "0". Here I would prefer to at least choose between the LV-Type and the .Net Object (right click -> "convert type").
Workaround is to return the datetime as "object" and convert it manually:
Other Problems:
The good news is, the wrapper now seems to be stable and work (with a lot of try-and-error)
10-10-2025 03:52 PM
This !
Hope it will be fixed soon...
10-13-2025 03:51 AM
I see this error when executing .net code that worked fine on net4.8:
Possible reason(s):
LabVIEW: (Hex 0x6F2) The specified method was not found in the .NET Core type.
No obvious reason and solution so far.
What is the procedure to debug .net core code with LV? In net4.8 i could simply attach to labview and set breakpoint in my .net code.
10-20-2025 08:19 AM
Seems LV is unable to handle arrays of structs and throws this exception:
public struct Signal
{
public int Id {get;set;}
public string Name {get;set;}
public Direction Direction {get;set;}
public SignalStrength Strength {get;set;}
public DateTime Timestamp {get;set;}
public double Frequency {get;set;}
public double Amplitude {get;set;}
public bool IsActive {get;set;}
public string Description {get;set;}
}
public enum Direction
{
Up,
Down,
Left,
Right
}
public enum SignalStrength
{
Weak,
Medium,
Strong,
VeryStrong
}
public class SignalGenerator
{
private readonly Random _random;
private readonly string[] _signalNames = { "Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta" };
private int _currentId;
public SignalGenerator()
{
_random = new Random();
_currentId = 1;
}
public Signal[] GetSignals(int count = 10)
{
var signals = new Signal[count];
for (int i = 0; i < count; i++)
{
signals[i] = GenerateRandomSignal();
}
return signals;
}
private Signal GenerateRandomSignal()
{
return new Signal
{
Id = _currentId++,
Name = _signalNames[_random.Next(_signalNames.Length)],
Direction = (Direction)_random.Next(Enum.GetValues(typeof(Direction)).Length),
Strength = (SignalStrength)_random.Next(Enum.GetValues(typeof(SignalStrength)).Length),
Timestamp = DateTime.Now.AddSeconds(-_random.Next(0, 3600)),
Frequency = _random.NextDouble() * 1000.0 + 100.0, // 100-1100 Hz
Amplitude = _random.NextDouble() * 10.0, // 0-10
IsActive = _random.Next(2) == 1,
Description = $"Signal generated at {DateTime.Now:HH:mm:ss}"
};
}
}
When trying to read it from LV error is thrown:
Looks like a bug. Worked fine for net4.8
10-20-2025 02:15 PM
Also for some constructors node is too long:
Looks kind of funny 🙂
10-24-2025 10:17 AM
I appreciate this thread a place to keep track of some of these issues. I've been working with the .NET core for a while now. The first iteration was VERY buggy, but it seems to be getting better over time.
There's a thread over here:
https://forums.ni.com/t5/LabVIEW/LabVIEW-2025Q3-NET-core-memory-leak/m-p/4457731/highlight/false#M13...
About a memory leak which has been passed onto NI already.
I myself have mostly been working with other libraries from the open source world, which is where most of my issues have come from. The main outstanding issue that I have, is that there just seem to be *some* libraries that don't work for some reason. The main one I've seen this with is the StackExchange.Redis library -- a .NET library for communicating with redis.
When working with this library I get an error 1782 on first call, with seemingly no issues with the code. It appears to happen at the "GetDatabase" method.
After this error occurs, the .NET interface just seems to be entirely broken and I get other 1782 and 1778 errors:
LabVIEW has to be entirely restarted before anything can usefully run again.
This same code runs just fine with .NET Framework libraries.
Two other things of note:
1. Many of the "common" data types/methods (which you could have found in mscorlib previously) are now in "Sysetm.Private.CoreLib"... like the GUID constructor:
But sometimes this library causes other problems (e.g. I get an error that says "An error occurred trying to load the assembly").
2. In the latest patch the "Browse Methods..." button no longer works (which is a known issue, but probably worth mentioning). Not a big deal some of the time.. .but in some circumstances, the method lists can be very long, and pretty painful without the browser.