I'm trying to run some code on Windows IoT Core that uses DotNetty and I've run into the following exception:
System.TypeInitializationException: The type initializer for 'DotNetty.Transport.Channels.DefaultChannelId' threw an exception. ---> System.NotImplementedException: The method or operation is not implemented.
at System.Net.NetworkInformation.NetNativeNetworkInterface.GetNetworkInterfaces()
at DotNetty.Common.Internal.MacAddressUtil.GetBestAvailableMac()
at DotNetty.Common.Internal.DefaultPlatform.DotNetty.Common.Internal.IPlatform.GetDefaultDeviceId()
at DotNetty.Transport.Channels.DefaultChannelId.DefaultMachineId()
at DotNetty.Transport.Channels.DefaultChannelId..cctor()
--- End of inner exception stack trace ---
at DotNetty.Transport.Channels.AbstractChannel.NewId()
at DotNetty.Transport.Channels.AbstractChannel..ctor(IChannel parent)
at DotNetty.Transport.Channels.Sockets.AbstractSocketChannel..ctor(IChannel parent, Socket socket)
I have found the issue on github for corefx
9675 and one of the comments says
Those particular methods are unimplemented right now. We plan to add the rest of the support later this year in an update to the System.Net.NetworkInformation package.
I got System.Net.NetworkInformation
package v4.3.0 and when I call
System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
directly I sadly get the NotImplementedException
exception.
`System.NotImplementedException: The method or operation is not implemented.
at System.Net.NetworkInformation.NetNativeNetworkInterface.GetNetworkInterfaces()
at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
Question
Can I make this work on Windows IoT Core 14393
?