Page 1 of 1

.NET 6.0 support

Posted: 22 Nov 2021, 18:56
by vluedeling
We are trying to integrate the .NET Server SDK version 3.1.0 into a new project which is based on .NET 6.0 but cannot get it to work. Clients cannot connect. UaExport (version 1.5.1) reports timeouts.

For testing purposes, we have written a small library which encapsulates the Unified Automation libraries, together with a simple console test program.

When we target .NET 5.0 with these projects, everything works fine. UaExpert can connect and we see the nodes we expect to see.

When we just switch the target platform to in the project files from net5.0 to net6.0, the solution continues to compile, but when we run it, UaExpert refuses to connect.

Have there been tests already with .NET 6.0? If not, when do you plan to release a version that is compatible with .NET 6.0?

Re: .NET 6.0 support

Posted: 22 Nov 2021, 20:51
by Support Team
Hello,

when reading this:
https://documentation.unified-automation.com/uasdknet/3.1.0/html/L1Overview.html#intro_supported_frameworks_policies

including Note
Due to backwards compatibility our .NET Framework 4.8 and both .NET Standard assemblies already offer compatibility with Microsofts .NET5 Framework. But we cannot provide any support for it at the moment. Use it at your own risk.

I would consider NO, there were no tests ever done with .NET6 and most likely there were no test done with .NET5. In the compatibility table it says Standard 2.1 and Core 3.1 at the most. BTW capsulation Unified Automation libraries (for whatever reason) is not allowed due to license restrictions.

But yes, there is a plan to support .NET6 in the future, however as always we first wait until .NET6 is fully released, we do not test with any RC (release candidate) nor any pre-version.

Re: .NET 6.0 support

Posted: 29 Nov 2021, 12:33
by jramirez-jh
I'm also struggling with exactly the same problem, after doing some tests and tracing the network pakets using WireShark I've found that the SDK (running under .NET 6) is not able to open the port (socket) where the server is supposed to be listening.

This is very easy to confirm just executing the NETSTAT command on Windows to look for the open ports.

Re: .NET 6.0 support

Posted: 01 Dec 2021, 15:16
by Support Team
Yes, we are aware of this issue.

It´s a problem of opening a TCP socket. This comes from a change in the behavior of a .Net class in .Net6.

A workaround would be to set the InternetProtocolVersion to IPv4Only or to set the NetworkInterface to "0.0.0.0". But this would limit the whole thing to IPv4.
For IPv4 and IPv6 working, the NetworkInterface would have to be set to "[::]".

A more detailed explanation of the NetworkInterface property can be found here:
https://documentation.unified-automation.com/uasdknet/3.1.0/html/L2BaseLibConfigSchema.html#L3NetworkInterfaceConfiguration

Re: .NET 6.0 support

Posted: 20 Jan 2022, 22:23
by timothycorwin
Is there an ETA or roadmap for .NET 6.0 support? it is now generally available, the latest LTS release, and 3.1 will reach End of Support this December.
I would very much like to upgrade my OPC Servers before that time...

Re: .NET 6.0 support

Posted: 25 Oct 2022, 09:35
by werenskjold
Is there any updates on this issue?

Re: .NET 6.0 support

Posted: 25 Oct 2022, 11:12
by Support Team
Hi,

please check out .NET SDK Version v3.2.x

At least the changelog says that .NET6 is supported since end of August.