API que siempre inician excepciones en .NET Core y .NET 5+

Las siguientes API siempre producirán una excepción en .NET (Core) en todas las plataformas, o bien en un subconjunto de estas. En la mayoría de los casos, la excepción que se produce es PlatformNotSupportedException.

En este artículo, las API afectadas se organizan por espacio de nombres.

Nota:

  • Este artículo sigue en desarrollo. No es una lista completa de las API que inician excepciones en .NET 5+.
  • En este artículo no se incluyen las implementaciones de interfaz explícitas para la serialización binaria que inician excepciones en .NET 5+. Para obtener más información, vea Serialización binaria en .NET Core.

Sistema

Member Plataformas en las que se produce
AppDomain.CreateDomain All
AppDomain.ExecuteAssembly(String, String[], Byte[], AssemblyHashAlgorithm) All
AppDomain.Unload(AppDomain) Todas
Console.CapsLock Linux y macOS
Console.NumberLock Linux y macOS
Delegate.GetObjectData(SerializationInfo, StreamingContext) Todas
Exception.SerializeObjectState All
MarshalByRefObject.GetLifetimeService() All
MarshalByRefObject.InitializeLifetimeService() All
OperatingSystem.GetObjectData(SerializationInfo, StreamingContext) All
Type.ReflectionOnlyGetType(String, Boolean, Boolean) Todas

System.CodeDom.Compiler

Member Plataformas en las que se produce
CodeDomProvider.CompileAssemblyFromDom All
CodeDomProvider.CompileAssemblyFromFile All
CodeDomProvider.CompileAssemblyFromSource Todas

System.Collections.Specialized

Member Plataformas en las que se produce
NameObjectCollectionBase(SerializationInfo, StreamingContext) All
NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext) All
NameObjectCollectionBase.OnDeserialization(Object) Todas

System.Configuration

Member Plataformas en las que se produce
System.Configuration.RsaProtectedConfigurationProvider (todos los miembros) Todas

System.Console

Member Plataformas en las que se produce
Console.Beep() Linux y macOS
Console.BufferHeight (solo Establecer) Linux y macOS
Console.BufferWidth (solo Establecer) Linux y macOS
Console.CursorSize (solo Establecer) Linux y macOS
Console.CursorVisible (solo Obtener) Linux y macOS
Console.MoveBufferArea Linux y macOS
Console.SetWindowPosition Linux y macOS
Console.SetWindowSize Linux y macOS
Console.Title (solo Obtener) Linux y macOS
Console.WindowHeight (solo Establecer) Linux y macOS
Console.WindowLeft (solo Establecer) Linux y macOS
Console.WindowTop (solo Establecer) Linux y macOS
Console.WindowWidth (solo Establecer) Linux y macOS

System.Data.Common

Member Plataformas en las que se produce
DbDataReader.GetSchemaTable (genera NotSupportedException) Todas

System.Diagnostics.Process

Member Plataformas en las que se produce
Process.MaxWorkingSet (solo Establecer) Linux
Process.MinWorkingSet (solo Establecer) Linux
Process.ProcessorAffinity macOS
Process.MainWindowHandle Linux y macOS
Process.Start(String, String, String, SecureString, String) Linux y macOS
Process.Start(String, String, SecureString, String) Linux y macOS
ProcessStartInfo.UserName Linux y macOS
ProcessStartInfo.PasswordInClearText Linux y macOS
ProcessStartInfo.Domain Linux y macOS
ProcessStartInfo.LoadUserProfile Linux y macOS
ProcessThread.BasePriority (solo Establecer) Linux y macOS
ProcessThread.BasePriority (solo Obtener) macOS
ProcessThread.ProcessorAffinity (solo Establecer) Linux y macOS

System.IO

Member Plataformas en las que se produce
FileSystemInfo(SerializationInfo, StreamingContext) All
FileSystemInfo.GetObjectData(SerializationInfo, StreamingContext) Todas

System.IO.Pipes

Member Plataformas en las que se produce
NamedPipeClientStream.NumberOfServerInstances Linux y macOS
NamedPipeServerStream.GetImpersonationUserName() Linux y macOS
PipeStream.InBufferSize Linux y macOS
PipeStream.OutBufferSize Linux y macOS
PipeStream.ReadMode (solo Establecer) Linux y macOS
PipeStream.WaitForPipeDrain() Linux y macOS

System.Media

Member Plataformas en las que se produce
SoundPlayer(SerializationInfo, StreamingContext) Todas

System.Net

Member Plataformas en las que se produce
AuthenticationManager.Authenticate(String, WebRequest, ICredentials) All
AuthenticationManager.PreAuthenticate(WebRequest, ICredentials) All
FileWebRequest(SerializationInfo, StreamingContext) All
FileWebRequest.GetObjectData(SerializationInfo, StreamingContext) All
FileWebResponse(SerializationInfo, StreamingContext) All
FileWebResponse.GetObjectData(SerializationInfo, StreamingContext) All
HttpWebRequest(SerializationInfo, StreamingContext) All
HttpWebRequest.GetObjectData(SerializationInfo, StreamingContext) All
HttpWebResponse(SerializationInfo, StreamingContext) All
HttpWebResponse.GetObjectData(SerializationInfo, StreamingContext) All
WebProxy(SerializationInfo, StreamingContext) All
WebProxy.GetDefaultProxy() All
WebProxy.GetObjectData All
WebRequest(SerializationInfo, StreamingContext) All
WebRequest.GetObjectData(SerializationInfo, StreamingContext) All
WebResponse(SerializationInfo, StreamingContext) All
WebResponse.GetObjectData(SerializationInfo, StreamingContext) Todas

System.Net.NetworkInformation

Member Plataformas en las que se produce
Ping.Send Windows (UWP)

System.Net.Sockets

Member Plataformas en las que se produce
Socket(SocketInformation) All
Socket.DuplicateAndClose(Int32) Todas

System.Net.WebSockets

Member Plataformas en las que se produce
WebSocket.RegisterPrefixes() Todas

System.Reflection

Member Plataformas en las que se produce
Assembly.CodeBase All
Assembly.EscapedCodeBase All
Assembly.ReflectionOnlyLoad All
Assembly.ReflectionOnlyLoadFrom(String) All
AssemblyName.GetObjectData(SerializationInfo, StreamingContext) All
AssemblyName.KeyPair All
AssemblyName.OnDeserialization(Object) All
StrongNameKeyPair All
StrongNameKeyPair.PublicKey Todas

System.Runtime.CompilerServices

Member Plataformas en las que se produce
DebugInfoGenerator.CreatePdbGenerator() Todas

System.Runtime.InteropServices

Member Plataformas en las que se produce
IDispatchImplAttribute All
Marshal.GetIDispatchForObject(Object) All
RuntimeEnvironment.SystemConfigurationFile All
RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(Guid, Guid) All
RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) Todas
WindowsRuntimeMarshal.StringToHString(String) Linux y macOS
WindowsRuntimeMarshal.PtrToStringHString(IntPtr) Linux y macOS
WindowsRuntimeMarshal.FreeHString(IntPtr) Linux y macOS

System.Runtime.Serialization

Member Plataformas en las que se produce
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream, Object)* All
BinaryFormatter.Deserialize(Stream)* All
XsdDataContractExporter.Schemas All

* .NET 8 y versiones posteriores solo para todos los tipos de proyecto, excepto Windows Forms y WPF.

System.Security

Member Plataformas en las que se produce
CodeAccessPermission.Deny() All
CodeAccessPermission.PermitOnly() All
PermissionSet.ConvertPermissionSet(String, Byte[], String) All
PermissionSet.Deny() All
PermissionSet.PermitOnly() All
SecurityContext.Capture() All
SecurityContext.CreateCopy() All
SecurityContext.Dispose() All
SecurityContext.IsFlowSuppressed() All
SecurityContext.IsWindowsIdentityFlowSuppressed() All
SecurityContext.RestoreFlow() All
SecurityContext.Run(SecurityContext, ContextCallback, Object) All
SecurityContext.SuppressFlow() All
SecurityContext.SuppressFlowWindowsIdentity() Todas

System.Security.Claims

Member Plataformas en las que se produce
ClaimsPrincipal(SerializationInfo, StreamingContext) All
ClaimsPrincipal.GetObjectData(SerializationInfo, StreamingContext) All
ClaimsIdentity(SerializationInfo) All
ClaimsIdentity(SerializationInfo, StreamingContext) All
ClaimsIdentity.GetObjectData(SerializationInfo, StreamingContext) Todas

System.Security.Cryptography

Member Plataformas en las que se produce
AsymmetricAlgorithm.Create(String) Todas
System.Security.Cryptography.CngAlgorithm Linux y macOS
System.Security.Cryptography.CngAlgorithmGroup Linux y macOS
System.Security.Cryptography.CngKey Linux y macOS
System.Security.Cryptography.CngKeyBlobFormat Linux y macOS
System.Security.Cryptography.CngKeyCreationParameters Linux y macOS
System.Security.Cryptography.CngProvider Linux y macOS
System.Security.Cryptography.CngUIPolicy Linux y macOS
CryptoConfig.EncodeOID(String) Todas
CspKeyContainerInfo Linux y macOS
CspKeyContainerInfo.Accessible Linux y macOS
CspKeyContainerInfo.Exportable Linux y macOS
CspKeyContainerInfo.HardwareDevice Linux y macOS
CspKeyContainerInfo.KeyContainerName Linux y macOS
CspKeyContainerInfo.KeyNumber Linux y macOS
CspKeyContainerInfo.MachineKeyStore Linux y macOS
CspKeyContainerInfo.Protected Linux y macOS
CspKeyContainerInfo.ProviderName Linux y macOS
CspKeyContainerInfo.ProviderType Linux y macOS
CspKeyContainerInfo.RandomlyGenerated Linux y macOS
CspKeyContainerInfo.Removable Linux y macOS
CspKeyContainerInfo.UniqueKeyContainerName Linux y macOS
ECDiffieHellmanCng.FromXmlString(String, ECKeyXmlFormat) Todas
ECDiffieHellmanCng.ToXmlString(ECKeyXmlFormat) All
ECDiffieHellmanCngPublicKey.FromXmlString(String) All
ECDiffieHellmanCngPublicKey.ToXmlString() Todas
ECDiffieHellmanPublicKey.ToByteArray() Linux y macOS
ECDiffieHellmanPublicKey.ToXmlString() Todas
ECDsaCng.FromXmlString(String, ECKeyXmlFormat) All
ECDsaCng.ToXmlString(ECKeyXmlFormat) All
HashAlgorithm.Create() All
HMAC.Create() All
HMAC.Create(String) All
HMAC.HashCore All
HMAC.HashFinal All
HMAC.Initialize All
KeyedHashAlgorithm.Create() All
KeyedHashAlgorithm.Create(String) Todas
ProtectedData.Protect Linux y macOS
ProtectedData.Unprotect Linux y macOS
System.Security.Cryptography.RSACryptoServiceProvider.DecryptValue(Byte[]) Todas
System.Security.Cryptography.RSACryptoServiceProvider.EncryptValue(Byte[]) All
System.Security.Cryptography.RSA.DecryptValue(Byte[]) All
System.Security.Cryptography.RSA.EncryptValue(Byte[]) All
RSA.FromXmlString All
RSA.ToXmlString All
SymmetricAlgorithm.Create() All
SymmetricAlgorithm.Create(String) Todas

System.Security.Cryptography.Pkcs

Member Plataformas en las que se produce
CmsSigner(CspParameters) All
SignerInfo.ComputeCounterSignature() Todas

System.Security.Cryptography.X509Certificates

Miembro Plataformas en las que se produce
X509Certificate(SerializationInfo, StreamingContext) All
X509Certificate.Import All
X509Certificate2(SerializationInfo, StreamingContext) Todas
X509Certificate2.PrivateKey (solo Establecer) Todos

System.Security.Authentication.ExtendedProtection

Miembro Plataformas en las que se produce
ExtendedProtectionPolicy(SerializationInfo, StreamingContext) Todos

System.Security.Policy

Miembro Plataformas en las que se produce
Hash.GetObjectData(SerializationInfo, StreamingContext) Todos

System.ServiceProcess.ServiceController

Miembro Plataformas en las que se produce
TimeoutException(SerializationInfo, StreamingContext) Todos

System.Text.RegularExpressions

Miembro Plataformas en las que se produce
Regex.CompileToAssembly Todos

System.Threading

Miembro Plataformas en las que se produce
CompressedStack.GetObjectData(SerializationInfo, StreamingContext) All
ExecutionContext.GetObjectData(SerializationInfo, StreamingContext) All
Thread.Abort All
Thread.ResetAbort() All
Thread.Resume() All
Thread.Suspend() Todas

System.Xml

Miembro Plataformas en las que se produce
XmlDictionaryReader.CreateMtomReader(Byte[], Int32, Int32, Encoding[], String, XmlDictionaryReaderQuotas, Int32, OnXmlDictionaryReaderClose) All
XmlDictionaryReader.CreateMtomReader(Stream, Encoding[], String, XmlDictionaryReaderQuotas, Int32, OnXmlDictionaryReaderClose) All
XmlDictionaryWriter.CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean) Todas

Vea también