From f7615adbd51562c11dace1006da091f3521d24b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Mon, 25 May 2026 14:32:59 +0100 Subject: [PATCH 1/2] Replace deprecated type exclusion in project with attribute --- .../NetworkHelper/IPConfiguration.cs | 3 ++ .../NetworkInformationOptions.cs | 3 ++ .../NetworkInformation/WirelessAPStation.cs | 2 + .../Security/NetworkSecurity.cs | 1 + .../Sockets/AddressFamily.cs | 3 ++ .../Sockets/ProtocolFamily.cs | 3 ++ .../Sockets/ProtocolType.cs | 3 ++ .../Sockets/SelectMode.cs | 3 ++ .../Sockets/SocketErrors.cs | 3 ++ .../Sockets/SocketFlags.cs | 3 ++ .../Sockets/SocketOptionLevel.cs | 3 ++ .../Sockets/SocketOptionName.cs | 3 ++ .../Sockets/SocketType.cs | 3 ++ nanoFramework.System.Net/System.Net.nfproj | 46 +------------------ 14 files changed, 37 insertions(+), 45 deletions(-) diff --git a/nanoFramework.System.Net/NetworkHelper/IPConfiguration.cs b/nanoFramework.System.Net/NetworkHelper/IPConfiguration.cs index 16f4697..df40007 100644 --- a/nanoFramework.System.Net/NetworkHelper/IPConfiguration.cs +++ b/nanoFramework.System.Net/NetworkHelper/IPConfiguration.cs @@ -1,11 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Runtime.CompilerServices; + namespace nanoFramework.Networking { /// /// IP configuration to be used for static IP address configuration. /// + [ExcludeType] public class IPConfiguration { /// diff --git a/nanoFramework.System.Net/NetworkInformation/NetworkInformationOptions.cs b/nanoFramework.System.Net/NetworkInformation/NetworkInformationOptions.cs index 5d67373..2ffb463 100644 --- a/nanoFramework.System.Net/NetworkInformation/NetworkInformationOptions.cs +++ b/nanoFramework.System.Net/NetworkInformation/NetworkInformationOptions.cs @@ -4,11 +4,14 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.NetworkInformation { /// /// Options for . /// + [ExcludeType] internal enum NetworkInformationOptions { /// diff --git a/nanoFramework.System.Net/NetworkInformation/WirelessAPStation.cs b/nanoFramework.System.Net/NetworkInformation/WirelessAPStation.cs index 509dc60..88518f2 100644 --- a/nanoFramework.System.Net/NetworkInformation/WirelessAPStation.cs +++ b/nanoFramework.System.Net/NetworkInformation/WirelessAPStation.cs @@ -5,12 +5,14 @@ // using System; +using System.Runtime.CompilerServices; namespace System.Net.NetworkInformation { /// /// Enum of Phy protocols used for connection. /// + [ExcludeType] [Flags] public enum PhyProtocols { diff --git a/nanoFramework.System.Net/Security/NetworkSecurity.cs b/nanoFramework.System.Net/Security/NetworkSecurity.cs index ec17d6a..6874190 100644 --- a/nanoFramework.System.Net/Security/NetworkSecurity.cs +++ b/nanoFramework.System.Net/Security/NetworkSecurity.cs @@ -60,6 +60,7 @@ public enum SslProtocols /// /// The verification scheme to use for authentication. /// + [ExcludeType] public enum SslVerification { /// diff --git a/nanoFramework.System.Net/Sockets/AddressFamily.cs b/nanoFramework.System.Net/Sockets/AddressFamily.cs index b7c7cad..65c9c9c 100644 --- a/nanoFramework.System.Net/Sockets/AddressFamily.cs +++ b/nanoFramework.System.Net/Sockets/AddressFamily.cs @@ -4,6 +4,8 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { /// @@ -13,6 +15,7 @@ namespace System.Net.Sockets /// An AddressFamily member specifies the addressing scheme that a will use to resolve an address. For example, /// InterNetwork indicates that an IP version 4 address is expected when a connects to an endpoint. /// + [ExcludeType] public enum AddressFamily { /// diff --git a/nanoFramework.System.Net/Sockets/ProtocolFamily.cs b/nanoFramework.System.Net/Sockets/ProtocolFamily.cs index 1a1114c..995d970 100644 --- a/nanoFramework.System.Net/Sockets/ProtocolFamily.cs +++ b/nanoFramework.System.Net/Sockets/ProtocolFamily.cs @@ -4,11 +4,14 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { /// /// Specifies the type of protocol that an instance of the /// + [ExcludeType] public enum ProtocolFamily { /// diff --git a/nanoFramework.System.Net/Sockets/ProtocolType.cs b/nanoFramework.System.Net/Sockets/ProtocolType.cs index 7b73fca..57bf5e2 100644 --- a/nanoFramework.System.Net/Sockets/ProtocolType.cs +++ b/nanoFramework.System.Net/Sockets/ProtocolType.cs @@ -4,11 +4,14 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { /// /// Specifies the protocols that the class supports. /// + [ExcludeType] public enum ProtocolType { /// diff --git a/nanoFramework.System.Net/Sockets/SelectMode.cs b/nanoFramework.System.Net/Sockets/SelectMode.cs index 7157c9e..1c6058d 100644 --- a/nanoFramework.System.Net/Sockets/SelectMode.cs +++ b/nanoFramework.System.Net/Sockets/SelectMode.cs @@ -4,11 +4,14 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { /// /// Specifies the mode for polling the status of a socket. /// + [ExcludeType] public enum SelectMode { /// diff --git a/nanoFramework.System.Net/Sockets/SocketErrors.cs b/nanoFramework.System.Net/Sockets/SocketErrors.cs index c1532bf..a811771 100644 --- a/nanoFramework.System.Net/Sockets/SocketErrors.cs +++ b/nanoFramework.System.Net/Sockets/SocketErrors.cs @@ -4,11 +4,14 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { /// /// Defines socket error constants. /// + [ExcludeType] public enum SocketError : int { /// diff --git a/nanoFramework.System.Net/Sockets/SocketFlags.cs b/nanoFramework.System.Net/Sockets/SocketFlags.cs index 7a3ef5c..5414c91 100644 --- a/nanoFramework.System.Net/Sockets/SocketFlags.cs +++ b/nanoFramework.System.Net/Sockets/SocketFlags.cs @@ -4,6 +4,8 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { using System; @@ -11,6 +13,7 @@ namespace System.Net.Sockets /// /// This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values. /// + [ExcludeType] [Flags] public enum SocketFlags { diff --git a/nanoFramework.System.Net/Sockets/SocketOptionLevel.cs b/nanoFramework.System.Net/Sockets/SocketOptionLevel.cs index 90679ff..75a0d4c 100644 --- a/nanoFramework.System.Net/Sockets/SocketOptionLevel.cs +++ b/nanoFramework.System.Net/Sockets/SocketOptionLevel.cs @@ -4,6 +4,8 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { // @@ -13,6 +15,7 @@ namespace System.Net.Sockets /// /// Defines socket option levels for the class. /// + [ExcludeType] public enum SocketOptionLevel { /// diff --git a/nanoFramework.System.Net/Sockets/SocketOptionName.cs b/nanoFramework.System.Net/Sockets/SocketOptionName.cs index d300ef6..f20bfd0 100644 --- a/nanoFramework.System.Net/Sockets/SocketOptionName.cs +++ b/nanoFramework.System.Net/Sockets/SocketOptionName.cs @@ -4,6 +4,8 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { using System; @@ -15,6 +17,7 @@ namespace System.Net.Sockets /// The SocketOptionName enumeration defines the name of each Socket configuration option. /// Sockets can be configured with the method. /// + [ExcludeType] public enum SocketOptionName { diff --git a/nanoFramework.System.Net/Sockets/SocketType.cs b/nanoFramework.System.Net/Sockets/SocketType.cs index 8e595a9..ebe2952 100644 --- a/nanoFramework.System.Net/Sockets/SocketType.cs +++ b/nanoFramework.System.Net/Sockets/SocketType.cs @@ -4,6 +4,8 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System.Net.Sockets { /// @@ -14,6 +16,7 @@ namespace System.Net.Sockets /// and a ProtocolType. The SocketType enumeration provides several options for defining the type of that you /// intend to open. /// + [ExcludeType] public enum SocketType { /// diff --git a/nanoFramework.System.Net/System.Net.nfproj b/nanoFramework.System.Net/System.Net.nfproj index bfb864a..8e9fdcb 100644 --- a/nanoFramework.System.Net/System.Net.nfproj +++ b/nanoFramework.System.Net/System.Net.nfproj @@ -35,50 +35,6 @@ sys_net_native System.Net - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - @@ -162,4 +118,4 @@ - \ No newline at end of file + From 2606fa74c98fa04aa1316b75a84c4e83e0e1c035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Wed, 27 May 2026 14:33:20 +0100 Subject: [PATCH 2/2] Update AssemblyInfo.cs --- nanoFramework.System.Net/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nanoFramework.System.Net/Properties/AssemblyInfo.cs b/nanoFramework.System.Net/Properties/AssemblyInfo.cs index 99b0b81..af89678 100644 --- a/nanoFramework.System.Net/Properties/AssemblyInfo.cs +++ b/nanoFramework.System.Net/Properties/AssemblyInfo.cs @@ -16,7 +16,7 @@ //////////////////////////////////////////////////////////////// // update this whenever the native assembly signature changes // -[assembly: AssemblyNativeVersion("100.20.0.1")] +[assembly: AssemblyNativeVersion("100.20.0.2")] //////////////////////////////////////////////////////////////// // Setting ComVisible to false makes the types in this assembly not visible