API yang selalu melemparkan pengecualian pada .NET Core dan .NET 5+

API berikut akan selalu memberikan pengecualian pada .NET (Core) pada semua atau subset platform. Dalam kebanyakan kasus, pengecualian yang dilemparkan adalah PlatformNotSupportedException.

Artikel ini mengatur API yang terpengaruh menurut namespace layanan.

Catatan

  • Artikel ini sedang dalam pengerjaan. Ini bukan daftar lengkap API yang melempar pengecualian pada .NET 5+.
  • Artikel ini tidak menyertakan implementasi antarmuka eksplisit untuk serialisasi biner yang melemparkan pada .NET 5+. Untuk informasi selengkapnya, lihat Serialisasi biner di .NET Core.

Sistem

Anggota Platform yang melempar
AppDomain.CreateDomain Semua
AppDomain.ExecuteAssembly(String, String[], Byte[], AssemblyHashAlgorithm) Semua
AppDomain.Unload(AppDomain) Semua
Console.CapsLock Linux dan macOS
Console.NumberLock Linux dan macOS
Delegate.GetObjectData(SerializationInfo, StreamingContext) Semua
Exception.SerializeObjectState Semua
MarshalByRefObject.GetLifetimeService() Semua
MarshalByRefObject.InitializeLifetimeService() Semua
OperatingSystem.GetObjectData(SerializationInfo, StreamingContext) Semua
Type.ReflectionOnlyGetType(String, Boolean, Boolean) Semua

System.CodeDom.Compiler

Anggota Platform yang melempar
CodeDomProvider.CompileAssemblyFromDom Semua
CodeDomProvider.CompileAssemblyFromFile Semua
CodeDomProvider.CompileAssemblyFromSource Semua

System.Collections.Specialized

Anggota Platform yang melempar
NameObjectCollectionBase(SerializationInfo, StreamingContext) Semua
NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext) Semua
NameObjectCollectionBase.OnDeserialization(Object) Semua

System.Configuration

Anggota Platform yang melempar
System.Configuration.RsaProtectedConfigurationProvider (semua anggota) Semua

System.Console

Anggota Platform yang melempar
Console.Beep() Linux dan macOS
Console.BufferHeight (hanya diatur) Linux dan macOS
Console.BufferWidth (hanya diatur) Linux dan macOS
Console.CursorSize (hanya diatur) Linux dan macOS
Console.CursorVisible (dapatkan saja) Linux dan macOS
Console.MoveBufferArea Linux dan macOS
Console.SetWindowPosition Linux dan macOS
Console.SetWindowSize Linux dan macOS
Console.Title (dapatkan saja) Linux dan macOS
Console.WindowHeight (hanya diatur) Linux dan macOS
Console.WindowLeft (hanya diatur) Linux dan macOS
Console.WindowTop (hanya diatur) Linux dan macOS
Console.WindowWidth (hanya diatur) Linux dan macOS

System.Data.Common

Anggota Platform yang melempar
DbDataReader.GetSchemaTable (Melempar NotSupportedException) Semua

System.Diagnostics.Process

Anggota Platform yang melempar
Process.MaxWorkingSet (hanya diatur) Linux
Process.MinWorkingSet (hanya diatur) Linux
Process.ProcessorAffinity macOS
Process.MainWindowHandle Linux dan macOS
Process.Start(String, String, String, SecureString, String) Linux dan macOS
Process.Start(String, String, SecureString, String) Linux dan macOS
ProcessStartInfo.UserName Linux dan macOS
ProcessStartInfo.PasswordInClearText Linux dan macOS
ProcessStartInfo.Domain Linux dan macOS
ProcessStartInfo.LoadUserProfile Linux dan macOS
ProcessThread.BasePriority (hanya diatur) Linux dan macOS
ProcessThread.BasePriority (dapatkan saja) macOS
ProcessThread.ProcessorAffinity (hanya diatur) Linux dan macOS

System.IO

Anggota Platform yang melempar
FileSystemInfo(SerializationInfo, StreamingContext) Semua
FileSystemInfo.GetObjectData(SerializationInfo, StreamingContext) Semua

System.IO.Pipes

Anggota Platform yang melempar
NamedPipeClientStream.NumberOfServerInstances Linux dan macOS
NamedPipeServerStream.GetImpersonationUserName() Linux dan macOS
PipeStream.InBufferSize Linux dan macOS
PipeStream.OutBufferSize Linux dan macOS
PipeStream.ReadMode (hanya diatur) Linux dan macOS
PipeStream.WaitForPipeDrain() Linux dan macOS

System.Media

Anggota Platform yang melempar
SoundPlayer(SerializationInfo, StreamingContext) Semua

System.Net

Anggota Platform yang melempar
AuthenticationManager.Authenticate(String, WebRequest, ICredentials) Semua
AuthenticationManager.PreAuthenticate(WebRequest, ICredentials) Semua
FileWebRequest(SerializationInfo, StreamingContext) Semua
FileWebRequest.GetObjectData(SerializationInfo, StreamingContext) Semua
FileWebResponse(SerializationInfo, StreamingContext) Semua
FileWebResponse.GetObjectData(SerializationInfo, StreamingContext) Semua
HttpWebRequest(SerializationInfo, StreamingContext) Semua
HttpWebRequest.GetObjectData(SerializationInfo, StreamingContext) Semua
HttpWebResponse(SerializationInfo, StreamingContext) Semua
HttpWebResponse.GetObjectData(SerializationInfo, StreamingContext) Semua
WebProxy(SerializationInfo, StreamingContext) Semua
WebProxy.GetDefaultProxy() Semua
WebProxy.GetObjectData Semua
WebRequest(SerializationInfo, StreamingContext) Semua
WebRequest.GetObjectData(SerializationInfo, StreamingContext) Semua
WebResponse(SerializationInfo, StreamingContext) Semua
WebResponse.GetObjectData(SerializationInfo, StreamingContext) Semua

System.Net.NetworkInformation

Anggota Platform yang melempar
Ping.Send Windows (UWP)

System.Net.Sockets

Anggota Platform yang melempar
Socket(SocketInformation) Semua
Socket.DuplicateAndClose(Int32) Semua

System.Net.WebSockets

Anggota Platform yang melempar
WebSocket.RegisterPrefixes() Semua

System.Reflection

Anggota Platform yang melempar
Assembly.CodeBase Semua
Assembly.EscapedCodeBase Semua
Assembly.LoadFrom(String, Byte[], AssemblyHashAlgorithm) Semua
Assembly.ReflectionOnlyLoad Semua
Assembly.ReflectionOnlyLoadFrom(String) Semua
AssemblyName.GetObjectData(SerializationInfo, StreamingContext) Semua
AssemblyName.KeyPair Semua
AssemblyName.OnDeserialization(Object) Semua
StrongNameKeyPair Semua
StrongNameKeyPair.PublicKey Semua

System.Runtime.CompilerServices

Anggota Platform yang melempar
DebugInfoGenerator.CreatePdbGenerator() Semua

System.Runtime.InteropServices

Anggota Platform yang melempar
IDispatchImplAttribute Semua
Marshal.GetIDispatchForObject(Object) Semua
RuntimeEnvironment.SystemConfigurationFile Semua
RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(Guid, Guid) Semua
RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) Semua
WindowsRuntimeMarshal.StringToHString(String) Linux dan macOS
WindowsRuntimeMarshal.PtrToStringHString(IntPtr) Linux dan macOS
WindowsRuntimeMarshal.FreeHString(IntPtr) Linux dan macOS

System.Runtime.Serialization

Anggota Platform yang melempar
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream, Object)* Semua
BinaryFormatter.Deserialize(Stream)* Semua
XsdDataContractExporter.Schemas Semua

* .NET 8 dan versi yang lebih baru hanya untuk semua jenis proyek kecuali Formulir Windows dan WPF.

System.Security

Anggota Platform yang melempar
CodeAccessPermission.Deny() Semua
CodeAccessPermission.PermitOnly() Semua
PermissionSet.ConvertPermissionSet(String, Byte[], String) Semua
PermissionSet.Deny() Semua
PermissionSet.PermitOnly() Semua
SecurityContext.Capture() Semua
SecurityContext.CreateCopy() Semua
SecurityContext.Dispose() Semua
SecurityContext.IsFlowSuppressed() Semua
SecurityContext.IsWindowsIdentityFlowSuppressed() Semua
SecurityContext.RestoreFlow() Semua
SecurityContext.Run(SecurityContext, ContextCallback, Object) Semua
SecurityContext.SuppressFlow() Semua
SecurityContext.SuppressFlowWindowsIdentity() Semua

System.Security.Claims

Anggota Platform yang melempar
ClaimsPrincipal(SerializationInfo, StreamingContext) Semua
ClaimsPrincipal.GetObjectData(SerializationInfo, StreamingContext) Semua
ClaimsIdentity(SerializationInfo) Semua
ClaimsIdentity(SerializationInfo, StreamingContext) Semua
ClaimsIdentity.GetObjectData(SerializationInfo, StreamingContext) Semua

System.Security.Cryptography

Anggota Platform yang melempar
AsymmetricAlgorithm.Create(String) Semua
System.Security.Cryptography.CngAlgorithm Linux dan macOS
System.Security.Cryptography.CngAlgorithmGroup Linux dan macOS
System.Security.Cryptography.CngKey Linux dan macOS
System.Security.Cryptography.CngKeyBlobFormat Linux dan macOS
System.Security.Cryptography.CngKeyCreationParameters Linux dan macOS
System.Security.Cryptography.CngProvider Linux dan macOS
System.Security.Cryptography.CngUIPolicy Linux dan macOS
CryptoConfig.EncodeOID(String) Semua
CspKeyContainerInfo Linux dan macOS
CspKeyContainerInfo.Accessible Linux dan macOS
CspKeyContainerInfo.Exportable Linux dan macOS
CspKeyContainerInfo.HardwareDevice Linux dan macOS
CspKeyContainerInfo.KeyContainerName Linux dan macOS
CspKeyContainerInfo.KeyNumber Linux dan macOS
CspKeyContainerInfo.MachineKeyStore Linux dan macOS
CspKeyContainerInfo.Protected Linux dan macOS
CspKeyContainerInfo.ProviderName Linux dan macOS
CspKeyContainerInfo.ProviderType Linux dan macOS
CspKeyContainerInfo.RandomlyGenerated Linux dan macOS
CspKeyContainerInfo.Removable Linux dan macOS
CspKeyContainerInfo.UniqueKeyContainerName Linux dan macOS
ECDiffieHellmanCng.FromXmlString(String, ECKeyXmlFormat) Semua
ECDiffieHellmanCng.ToXmlString(ECKeyXmlFormat) Semua
ECDiffieHellmanCngPublicKey.FromXmlString(String) Semua
ECDiffieHellmanCngPublicKey.ToXmlString() Semua
ECDiffieHellmanPublicKey.ToByteArray() Linux dan macOS
ECDiffieHellmanPublicKey.ToXmlString() Semua
ECDsaCng.FromXmlString(String, ECKeyXmlFormat) Semua
ECDsaCng.ToXmlString(ECKeyXmlFormat) Semua
HashAlgorithm.Create() Semua
HMAC.Create() Semua
HMAC.Create(String) Semua
HMAC.HashCore Semua
HMAC.HashFinal Semua
HMAC.Initialize Semua
KeyedHashAlgorithm.Create() Semua
KeyedHashAlgorithm.Create(String) Semua
ProtectedData.Protect Linux dan macOS
ProtectedData.Unprotect Linux dan macOS
System.Security.Cryptography.RSACryptoServiceProvider.DecryptValue(Byte[]) Semua
System.Security.Cryptography.RSACryptoServiceProvider.EncryptValue(Byte[]) Semua
System.Security.Cryptography.RSA.DecryptValue(Byte[]) Semua
System.Security.Cryptography.RSA.EncryptValue(Byte[]) Semua
RSA.FromXmlString Semua
RSA.ToXmlString Semua
SymmetricAlgorithm.Create() Semua
SymmetricAlgorithm.Create(String) Semua

System.Security.Cryptography.Pkcs

Anggota Platform yang melempar
CmsSigner(CspParameters) Semua
SignerInfo.ComputeCounterSignature() Semua

System.Security.Cryptography.X509Certificates

Anggota Platform yang melempar
X509Certificate(SerializationInfo, StreamingContext) Semua
X509Certificate.Import Semua
X509Certificate2(SerializationInfo, StreamingContext) Semua
X509Certificate2.PrivateKey (hanya diatur) Semua

System.Security.Authentication.ExtendedProtection

Anggota Platform yang melempar
ExtendedProtectionPolicy(SerializationInfo, StreamingContext) Semua

System.Security.Policy

Anggota Platform yang melempar
Hash.GetObjectData(SerializationInfo, StreamingContext) Semua

System.ServiceProcess.ServiceController

Anggota Platform yang melempar
TimeoutException(SerializationInfo, StreamingContext) Semua

System.Text.RegularExpressions

Anggota Platform yang melempar
Regex.CompileToAssembly Semua

System.Threading

Anggota Platform yang melempar
CompressedStack.GetObjectData(SerializationInfo, StreamingContext) Semua
ExecutionContext.GetObjectData(SerializationInfo, StreamingContext) Semua
Thread.Abort Semua
Thread.ResetAbort() Semua
Thread.Resume() Semua
Thread.Suspend() Semua

System.Xml

Anggota Platform yang melempar
XmlDictionaryReader.CreateMtomReader(Byte[], Int32, Int32, Encoding[], String, XmlDictionaryReaderQuotas, Int32, OnXmlDictionaryReaderClose) Semua
XmlDictionaryReader.CreateMtomReader(Stream, Encoding[], String, XmlDictionaryReaderQuotas, Int32, OnXmlDictionaryReaderClose) Semua
XmlDictionaryWriter.CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean) Semua

Lihat juga