From d48c56432e7f9dea9197a7572ca45c634895c6fb Mon Sep 17 00:00:00 2001 From: Gene Date: Mon, 19 Dec 2022 20:16:15 +0100 Subject: [PATCH] Fixes "Platform Not supported Exception" (TBI) --- UPnP/NetworkInfo.cs | 2 +- UPnP/SSDP.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/UPnP/NetworkInfo.cs b/UPnP/NetworkInfo.cs index f20f117..b59204f 100644 --- a/UPnP/NetworkInfo.cs +++ b/UPnP/NetworkInfo.cs @@ -97,7 +97,7 @@ public NetworkInfo(InterfaceHandler onNewInterfaceSink) NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces(); foreach (NetworkInterface i in interfaces) { -#if NETSTANDARD +#if NET6_0_OR_GREATER if (/*i.IsReceiveOnly == false &&*/ i.OperationalStatus == OperationalStatus.Up && i.SupportsMulticast == true) #else if (i.IsReceiveOnly == false && i.OperationalStatus == OperationalStatus.Up && i.SupportsMulticast == true) diff --git a/UPnP/SSDP.cs b/UPnP/SSDP.cs index 6de5a93..62c8130 100644 --- a/UPnP/SSDP.cs +++ b/UPnP/SSDP.cs @@ -201,7 +201,7 @@ private void SetupSessions() OpenSource.Utilities.EventLogger.Log(ex); // session.Client.Close(); } -#if NETSTANDARD +#if NET6_0_OR_GREATER catch (NotSupportedException ex) { OpenSource.Utilities.EventLogger.Log(ex); @@ -222,7 +222,7 @@ private void SetupSessions() OpenSource.Utilities.EventLogger.Log(ex); // usession.Client.Close(); } -#if NETSTANDARD +#if NET6_0_OR_GREATER catch (NotSupportedException ex) { OpenSource.Utilities.EventLogger.Log(ex); @@ -269,7 +269,7 @@ private void SetupSessions() OpenSource.Utilities.EventLogger.Log(ex); // session.Close(); } -#if NETSTANDARD +#if NET6_0_OR_GREATER catch (NotSupportedException ex) { OpenSource.Utilities.EventLogger.Log(ex); @@ -290,7 +290,7 @@ private void SetupSessions() OpenSource.Utilities.EventLogger.Log(ex); // usession.Close(); } -#if NETSTANDARD +#if NET6_0_OR_GREATER catch (NotSupportedException ex) { OpenSource.Utilities.EventLogger.Log(ex);