Belangrijke wijzigingen in .NET Core 2.1
Artikel 18-03-2023
3 inzenders
Feedback
In dit artikel
Core .NET-bibliotheken
MSBuild
Zie ook
Als u migreert naar versie 2.1 van .NET Core, kunnen de belangrijke wijzigingen in dit artikel van invloed zijn op uw app.
Pad-API's genereren geen uitzondering voor ongeldige tekens
API's waarbij bestandspaden worden gebruikt, valideren geen padtekens meer of genereert een ArgumentException ongeldig teken als er een ongeldig teken wordt gevonden.
In .NET Framework en .NET Core 1.0 - 2.0 worden de methoden die worden vermeld in de sectie Betreffende API's , een ArgumentException als het padargument een ongeldig padteken bevat. Vanaf .NET Core 2.1 controleren deze methoden niet langer op ongeldige padtekens of genereert u een uitzondering als er een ongeldig teken wordt gevonden.
Agressieve validatie van padtekens blokkeert enkele platformoverschrijdende scenario's. Deze wijziging is geïntroduceerd, zodat .NET niet probeert het resultaat van API-aanroepen van het besturingssysteem te repliceren of voorspellen. Zie de System.IO in .NET Core 2.1 sneak peek blogpost voor meer informatie.
.NET Core 2.1
Als uw code afhankelijk is van deze API's om te controleren op ongeldige tekens, kunt u een aanroep toevoegen aan Path.GetInvalidPathChars .
System.IO.Directory.CreateDirectory
System.IO.Directory.Delete
System.IO.Directory.EnumerateDirectories
System.IO.Directory.EnumerateFiles
System.IO.Directory.EnumerateFileSystemEntries
System.IO.Directory.GetCreationTime(String)
System.IO.Directory.GetCreationTimeUtc(String)
System.IO.Directory.GetDirectories
System.IO.Directory.GetDirectoryRoot(String)
System.IO.Directory.GetFiles
System.IO.Directory.GetFileSystemEntries
System.IO.Directory.GetLastAccessTime(String)
System.IO.Directory.GetLastAccessTimeUtc(String)
System.IO.Directory.GetLastWriteTime(String)
System.IO.Directory.GetLastWriteTimeUtc(String)
System.IO.Directory.GetParent(String)
System.IO.Directory.Move(String, String)
System.IO.Directory.SetCreationTime(String, DateTime)
System.IO.Directory.SetCreationTimeUtc(String, DateTime)
System.IO.Directory.SetCurrentDirectory(String)
System.IO.Directory.SetLastAccessTime(String, DateTime)
System.IO.Directory.SetLastAccessTimeUtc(String, DateTime)
System.IO.Directory.SetLastWriteTime(String, DateTime)
System.IO.Directory.SetLastWriteTimeUtc(String, DateTime)
System.IO.DirectoryInfo-ctor
System.IO.Directory.GetDirectories
System.IO.Directory.GetFiles
System.IO.DirectoryInfo.GetFileSystemInfos
System.IO.File.AppendAllText
System.IO.File.AppendAllTextAsync
System.IO.File.Copy
System.IO.File.Create
System.IO.File.CreateText
System.IO.File.Decrypt
System.IO.File.Delete
System.IO.File.Encrypt
System.IO.File.GetAttributes(String)
System.IO.File.GetCreationTime(String)
System.IO.File.GetCreationTimeUtc(String)
System.IO.File.GetLastAccessTime(String)
System.IO.File.GetLastAccessTimeUtc(String)
System.IO.File.GetLastWriteTime(String)
System.IO.File.GetLastWriteTimeUtc(String)
System.IO.File.Move
System.IO.File.Open
System.IO.File.OpenRead(String)
System.IO.File.OpenText(String)
System.IO.File.OpenWrite(String)
System.IO.File.ReadAllBytes(String)
System.IO.File.ReadAllBytesAsync(String, CancellationToken)
System.IO.File.ReadAllLines(String)
System.IO.File.ReadAllLinesAsync(String, CancellationToken)
System.IO.File.ReadAllText(String)
System.IO.File.ReadAllTextAsync(String, CancellationToken)
System.IO.File.SetAttributes(String, FileAttributes)
System.IO.File.SetCreationTime(String, DateTime)
System.IO.File.SetCreationTimeUtc(String, DateTime)
System.IO.File.SetLastAccessTime(String, DateTime)
System.IO.File.SetLastAccessTimeUtc(String, DateTime)
System.IO.File.SetLastWriteTime(String, DateTime)
System.IO.File.SetLastWriteTimeUtc(String, DateTime)
System.IO.File.WriteAllBytes(String, Byte[])
System.IO.File.WriteAllBytesAsync(String, Byte[], CancellationToken)
System.IO.File.WriteAllLines
System.IO.File.WriteAllLinesAsync
System.IO.File.WriteAllText
System.IO.FileInfo-ctor
System.IO.FileInfo.CopyTo
System.IO.FileInfo.MoveTo
System.IO.FileStream-ctor
System.IO.Path.GetFullPath(String)
System.IO.Path.IsPathRooted(String)
System.IO.Path.GetPathRoot(String)
System.IO.Path.ChangeExtension(String, String)
System.IO.Path.GetDirectoryName(String)
System.IO.Path.GetExtension(String)
System.IO.Path.HasExtension(String)
System.IO.Path.Combine
Privévelden toegevoegd aan ingebouwde structtypen
Privévelden zijn toegevoegd aan bepaalde structtypen in referentieassembly's . Als gevolg hiervan moeten deze structtypen in C# altijd worden geïnstantieerd met behulp van de nieuwe operator of de standaard letterlijke waarde .
In .NET Core 2.0 en vorige versies kunnen sommige structtypen, bijvoorbeeld, ConsoleKeyInfo worden geïnstantieerd zonder de operator of de new
standaard letterlijke waarde in C# te gebruiken. Dit komt doordat de referentieassembly's die door de C#-compiler worden gebruikt, de privévelden voor de structs niet bevatten. Alle privévelden voor .NET-structtypen worden toegevoegd aan de referentieassembly's vanaf .NET Core 2.1.
De volgende C#-code compileert bijvoorbeeld in .NET Core 2.0, maar niet in .NET Core 2.1:
ConsoleKeyInfo key;
if (key.ToString() == "y" )
{
Console.WriteLine("Yes!" );
}
In .NET Core 2.1 resulteert de vorige code in de volgende compilerfout: CS0165 - Gebruik van niet-toegewezen lokale variabele 'sleutel'
2.1
Instantieer structtypen met behulp van de operator of de new
standaard letterlijke waarde .
Voorbeeld:
ConsoleKeyInfo key = new ConsoleKeyInfo();
if (key.ToString() == "y" )
Console.WriteLine("Yes!" );
ConsoleKeyInfo key = default ;
if (key.ToString() == "y" )
Console.WriteLine("Yes!" );
Core .NET-bibliotheken
System.ArraySegment<T>.Enumerator
System.ArraySegment<T>
System.Boolean
System.Buffers.MemoryHandle
System.Buffers.StandardFormat
System.Byte
System.Char
System.Collections.DictionaryEntry
System.Collections.Generic.Dictionary<TKey,TValue>.Enumerator
System.Collections.Generic.Dictionary<TKey,TValue>.KeyCollection.Enumerator
System.Collections.Generic.Dictionary<TKey,TValue>.ValueCollection.Enumerator
System.Collections.Generic.HashSet<T>.Enumerator
System.Collections.Generic.KeyValuePair<TKey,TValue>
System.Collections.Generic.LinkedList<T>.Enumerator
System.Collections.Generic.List<T>.Enumerator
System.Collections.Generic.Queue<T>.Enumerator
System.Collections.Generic.SortedDictionary<TKey,TValue>.Enumerator
System.Collections.Generic.SortedDictionary<TKey,TValue>.KeyCollection.Enumerator
System.Collections.Generic.SortedDictionary<TKey,TValue>.ValueCollection.Enumerator
System.Collections.Generic.SortedSet<T>.Enumerator
System.Collections.Generic.Stack<T>.Enumerator
System.Collections.Immutable.ImmutableArray<T>.Enumerator
System.Collections.Immutable.ImmutableArray<T>
System.Collections.Immutable.ImmutableDictionary<TKey,TValue>.Enumerator
System.Collections.Immutable.ImmutableHashSet<T>.Enumerator
System.Collections.Immutable.ImmutableList<T>.Enumerator
System.Collections.Immutable.ImmutableQueue<T>.Enumerator
System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>.Enumerator
System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator
System.Collections.Immutable.ImmutableStack<T>.Enumerator
System.Collections.Specialized.BitVector32.Section
System.Collections.Specialized.BitVector32
LazyMemberInfo
System.ComponentModel.Design.Serialization.MemberRelationship
System.ConsoleKeyInfo
System.Data.SqlTypes.SqlBinary
System.Data.SqlTypes.SqlBoolean
System.Data.SqlTypes.SqlByte
System.Data.SqlTypes.SqlDateTime
System.Data.SqlTypes.SqlDecimal
System.Data.SqlTypes.SqlDouble
System.Data.SqlTypes.SqlGuid
System.Data.SqlTypes.SqlInt16
System.Data.SqlTypes.SqlInt32
System.Data.SqlTypes.SqlInt64
System.Data.SqlTypes.SqlMoney
System.Data.SqlTypes.SqlSingle
System.Data.SqlTypes.SqlString
System.DateTime
System.DateTimeOffset
System.Decimal
System.Diagnostics.CounterSample
System.Diagnostics.SymbolStore.SymbolToken
System.Diagnostics.Tracing.EventSource.EventData
System.Diagnostics.Tracing.EventSourceOptions
System.Double
System.Drawing.CharacterRange
System.Drawing.Point
System.Drawing.PointF
System.Drawing.Rectangle
System.Drawing.RectangleF
System.Drawing.Size
System.Drawing.SizeF
System.Guid
System.HashCode
System.Int16
System.Int32
System.Int64
System.IntPtr
System.IO.Pipelines.FlushResult
System.IO.Pipelines.ReadResult
System.IO.WaitForChangedResult
System.Memory<T>
System.ModuleHandle
System.Net.Security.SslApplicationProtocol
System.Net.Sockets.IPPacketInformation
System.Net.Sockets.SocketInformation
System.Net.Sockets.UdpReceiveResult
System.Net.WebSockets.ValueWebSocketReceiveResult
System.Nullable<T>
System.Numerics.BigInteger
System.Numerics.Complex
System.Numerics.Vector<T>
System.ReadOnlyMemory<T>
System.ReadOnlySpan<T>.Enumerator
System.ReadOnlySpan<T>
System.Reflection.CustomAttributeNamedArgument
System.Reflection.CustomAttributeTypedArgument
System.Reflection.Emit.Label
System.Reflection.Emit.OpCode
System.Reflection.Metadata.ArrayShape
System.Reflection.Metadata.AssemblyDefinition
System.Reflection.Metadata.AssemblyDefinitionHandle
System.Reflection.Metadata.AssemblyFile
System.Reflection.Metadata.AssemblyFileHandle
System.Reflection.Metadata.AssemblyFileHandleCollection.Enumerator
System.Reflection.Metadata.AssemblyFileHandleCollection
System.Reflection.Metadata.AssemblyReference
System.Reflection.Metadata.AssemblyReferenceHandle
System.Reflection.Metadata.AssemblyReferenceHandleCollection.Enumerator
System.Reflection.Metadata.AssemblyReferenceHandleCollection
System.Reflection.Metadata.Blob
System.Reflection.Metadata.BlobBuilder.Blobs
System.Reflection.Metadata.BlobContentId
System.Reflection.Metadata.BlobHandle
System.Reflection.Metadata.BlobReader
System.Reflection.Metadata.BlobWriter
System.Reflection.Metadata.Constant
System.Reflection.Metadata.ConstantHandle
System.Reflection.Metadata.CustomAttribute
System.Reflection.Metadata.CustomAttributeHandle
System.Reflection.Metadata.CustomAttributeHandleCollection.Enumerator
System.Reflection.Metadata.CustomAttributeHandleCollection
System.Reflection.Metadata.CustomAttributeNamedArgument<TType>
System.Reflection.Metadata.CustomAttributeTypedArgument<TType>
System.Reflection.Metadata.CustomAttributeValue<TType>
System.Reflection.Metadata.CustomDebugInformation
System.Reflection.Metadata.CustomDebugInformationHandle
System.Reflection.Metadata.CustomDebugInformationHandleCollection.Enumerator
System.Reflection.Metadata.CustomDebugInformationHandleCollection
System.Reflection.Metadata.DeclarativeSecurityAttribute
System.Reflection.Metadata.DeclarativeSecurityAttributeHandle
System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection.Enumerator
System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection
System.Reflection.Metadata.Document
System.Reflection.Metadata.DocumentHandle
System.Reflection.Metadata.DocumentHandleCollection.Enumerator
System.Reflection.Metadata.DocumentHandleCollection
System.Reflection.Metadata.DocumentNameBlobHandle
System.Reflection.Metadata.Ecma335.ArrayShapeEncoder
System.Reflection.Metadata.Ecma335.BlobEncoder
System.Reflection.Metadata.Ecma335.CustomAttributeArrayTypeEncoder
System.Reflection.Metadata.Ecma335.CustomAttributeElementTypeEncoder
System.Reflection.Metadata.Ecma335.CustomAttributeNamedArgumentsEncoder
System.Reflection.Metadata.Ecma335.CustomModifiersEncoder
System.Reflection.Metadata.Ecma335.EditAndContinueLogEntry
System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder
System.Reflection.Metadata.Ecma335.FixedArgumentsEncoder
System.Reflection.Metadata.Ecma335.GenericTypeArgumentsEncoder
System.Reflection.Metadata.Ecma335.InstructionEncoder
System.Reflection.Metadata.Ecma335.LabelHandle
System.Reflection.Metadata.Ecma335.LiteralEncoder
System.Reflection.Metadata.Ecma335.LiteralsEncoder
System.Reflection.Metadata.Ecma335.LocalVariablesEncoder
System.Reflection.Metadata.Ecma335.LocalVariableTypeEncoder
System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody
System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder
System.Reflection.Metadata.Ecma335.MethodSignatureEncoder
System.Reflection.Metadata.Ecma335.NamedArgumentsEncoder
System.Reflection.Metadata.Ecma335.NamedArgumentTypeEncoder
System.Reflection.Metadata.Ecma335.NameEncoder
System.Reflection.Metadata.Ecma335.ParametersEncoder
System.Reflection.Metadata.Ecma335.ParameterTypeEncoder
System.Reflection.Metadata.Ecma335.PermissionSetEncoder
System.Reflection.Metadata.Ecma335.ReturnTypeEncoder
System.Reflection.Metadata.Ecma335.ScalarEncoder
System.Reflection.Metadata.Ecma335.SignatureDecoder<TType,TGenericContext>
System.Reflection.Metadata.Ecma335.SignatureTypeEncoder
System.Reflection.Metadata.Ecma335.VectorEncoder
System.Reflection.Metadata.EntityHandle
System.Reflection.Metadata.EventAccessors
System.Reflection.Metadata.EventDefinition
System.Reflection.Metadata.EventDefinitionHandle
System.Reflection.Metadata.EventDefinitionHandleCollection.Enumerator
System.Reflection.Metadata.EventDefinitionHandleCollection
System.Reflection.Metadata.ExceptionRegion
System.Reflection.Metadata.ExportedType
System.Reflection.Metadata.ExportedTypeHandle
System.Reflection.Metadata.ExportedTypeHandleCollection.Enumerator
System.Reflection.Metadata.ExportedTypeHandleCollection
System.Reflection.Metadata.FieldDefinition
System.Reflection.Metadata.FieldDefinitionHandle
System.Reflection.Metadata.FieldDefinitionHandleCollection.Enumerator
System.Reflection.Metadata.FieldDefinitionHandleCollection
System.Reflection.Metadata.GenericParameter
System.Reflection.Metadata.GenericParameterConstraint
System.Reflection.Metadata.GenericParameterConstraintHandle
System.Reflection.Metadata.GenericParameterConstraintHandleCollection.Enumerator
System.Reflection.Metadata.GenericParameterConstraintHandleCollection
System.Reflection.Metadata.GenericParameterHandle
System.Reflection.Metadata.GenericParameterHandleCollection.Enumerator
System.Reflection.Metadata.GenericParameterHandleCollection
System.Reflection.Metadata.GuidHandle
System.Reflection.Metadata.Handle
System.Reflection.Metadata.ImportDefinition
System.Reflection.Metadata.ImportDefinitionCollection.Enumerator
System.Reflection.Metadata.ImportDefinitionCollection
System.Reflection.Metadata.ImportScope
System.Reflection.Metadata.ImportScopeCollection.Enumerator
System.Reflection.Metadata.ImportScopeCollection
System.Reflection.Metadata.ImportScopeHandle
System.Reflection.Metadata.InterfaceImplementation
System.Reflection.Metadata.InterfaceImplementationHandle
System.Reflection.Metadata.InterfaceImplementationHandleCollection.Enumerator
System.Reflection.Metadata.InterfaceImplementationHandleCollection
System.Reflection.Metadata.LocalConstant
System.Reflection.Metadata.LocalConstantHandle
System.Reflection.Metadata.LocalConstantHandleCollection.Enumerator
System.Reflection.Metadata.LocalConstantHandleCollection
System.Reflection.Metadata.LocalScope
System.Reflection.Metadata.LocalScopeHandle
System.Reflection.Metadata.LocalScopeHandleCollection.ChildrenEnumerator
System.Reflection.Metadata.LocalScopeHandleCollection.Enumerator
System.Reflection.Metadata.LocalScopeHandleCollection
System.Reflection.Metadata.LocalVariable
System.Reflection.Metadata.LocalVariableHandle
System.Reflection.Metadata.LocalVariableHandleCollection.Enumerator
System.Reflection.Metadata.LocalVariableHandleCollection
System.Reflection.Metadata.ManifestResource
System.Reflection.Metadata.ManifestResourceHandle
System.Reflection.Metadata.ManifestResourceHandleCollection.Enumerator
System.Reflection.Metadata.ManifestResourceHandleCollection
System.Reflection.Metadata.MemberReference
System.Reflection.Metadata.MemberReferenceHandle
System.Reflection.Metadata.MemberReferenceHandleCollection.Enumerator
System.Reflection.Metadata.MemberReferenceHandleCollection
System.Reflection.Metadata.MetadataStringComparer
System.Reflection.Metadata.MethodDebugInformation
System.Reflection.Metadata.MethodDebugInformationHandle
System.Reflection.Metadata.MethodDebugInformationHandleCollection.Enumerator
System.Reflection.Metadata.MethodDebugInformationHandleCollection
System.Reflection.Metadata.MethodDefinition
System.Reflection.Metadata.MethodDefinitionHandle
System.Reflection.Metadata.MethodDefinitionHandleCollection.Enumerator
System.Reflection.Metadata.MethodDefinitionHandleCollection
System.Reflection.Metadata.MethodImplementation
System.Reflection.Metadata.MethodImplementationHandle
System.Reflection.Metadata.MethodImplementationHandleCollection.Enumerator
System.Reflection.Metadata.MethodImplementationHandleCollection
System.Reflection.Metadata.MethodImport
System.Reflection.Metadata.MethodSignature<TType>
System.Reflection.Metadata.MethodSpecification
System.Reflection.Metadata.MethodSpecificationHandle
System.Reflection.Metadata.ModuleDefinition
System.Reflection.Metadata.ModuleDefinitionHandle
System.Reflection.Metadata.ModuleReference
System.Reflection.Metadata.ModuleReferenceHandle
System.Reflection.Metadata.NamespaceDefinition
System.Reflection.Metadata.NamespaceDefinitionHandle
System.Reflection.Metadata.Parameter
System.Reflection.Metadata.ParameterHandle
System.Reflection.Metadata.ParameterHandleCollection.Enumerator
System.Reflection.Metadata.ParameterHandleCollection
System.Reflection.Metadata.PropertyAccessors
System.Reflection.Metadata.PropertyDefinition
System.Reflection.Metadata.PropertyDefinitionHandle
System.Reflection.Metadata.PropertyDefinitionHandleCollection.Enumerator
System.Reflection.Metadata.PropertyDefinitionHandleCollection
System.Reflection.Metadata.ReservedBlob<THandle>
System.Reflection.Metadata.SequencePoint
System.Reflection.Metadata.SequencePointCollection.Enumerator
System.Reflection.Metadata.SequencePointCollection
System.Reflection.Metadata.SignatureHeader
System.Reflection.Metadata.StandaloneSignature
System.Reflection.Metadata.StandaloneSignatureHandle
System.Reflection.Metadata.StringHandle
System.Reflection.Metadata.TypeDefinition
System.Reflection.Metadata.TypeDefinitionHandle
System.Reflection.Metadata.TypeDefinitionHandleCollection.Enumerator
System.Reflection.Metadata.TypeDefinitionHandleCollection
System.Reflection.Metadata.TypeLayout
System.Reflection.Metadata.TypeReference
System.Reflection.Metadata.TypeReferenceHandle
System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator
System.Reflection.Metadata.TypeReferenceHandleCollection
System.Reflection.Metadata.TypeSpecification
System.Reflection.Metadata.TypeSpecificationHandle
System.Reflection.Metadata.UserStringHandle
System.Reflection.ParameterModifier
System.Reflection.PortableExecutable.CodeViewDebugDirectoryData
System.Reflection.PortableExecutable.DebugDirectoryEntry
System.Reflection.PortableExecutable.PEMemoryBlock
System.Reflection.PortableExecutable.SectionHeader
System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>
System.Runtime.CompilerServices.AsyncTaskMethodBuilder
System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<TResult>
System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder
System.Runtime.CompilerServices.AsyncVoidMethodBuilder
System.Runtime.CompilerServices.ConfiguredTaskAwaitable<TResult>.ConfiguredTaskAwaiter
System.Runtime.CompilerServices.ConfiguredTaskAwaitable<TResult>
System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter
System.Runtime.CompilerServices.ConfiguredTaskAwaitable
System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<TResult>
System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<TResult>.ConfiguredValueTaskAwaiter
System.Runtime.CompilerServices.TaskAwaiter<TResult>
System.Runtime.CompilerServices.TaskAwaiter
System.Runtime.CompilerServices.ValueTaskAwaiter<TResult>
System.Runtime.CompilerServices.ValueTaskAwaiter<TResult>
System.Runtime.InteropServices.ArrayWithOffset
System.Runtime.InteropServices.GCHandle
System.Runtime.InteropServices.HandleRef
System.Runtime.InteropServices.OSPlatform
System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken
System.Runtime.Serialization.SerializationEntry
System.Runtime.Serialization.StreamingContext
System.RuntimeArgumentHandle
System.RuntimeFieldHandle
System.RuntimeMethodHandle
System.RuntimeTypeHandle
System.SByte
System.Security.Cryptography.CngProperty
System.Security.Cryptography.ECCurve
System.Security.Cryptography.HashAlgorithmName
System.Security.Cryptography.X509Certificates.X509ChainStatus
System.Security.Cryptography.Xml.X509IssuerSerial
System.ServiceProcess.SessionChangeDescription
System.Single
System.Span<T>.Enumerator
System.Span<T>
System.Threading.AsyncFlowControl
System.Threading.AsyncLocalValueChangedArgs<T>
System.Threading.CancellationToken
System.Threading.CancellationTokenRegistration
System.Threading.LockCookie
System.Threading.SpinLock
System.Threading.SpinWait
System.Threading.Tasks.Dataflow.DataflowMessageHeader
System.Threading.Tasks.ParallelLoopResult
System.Threading.Tasks.ValueTask<TResult>
System.TimeSpan
System.TimeZoneInfo.TransitionTime
System.Transactions.TransactionOptions
System.TypedReference
System.TypedReference
System.UInt16
System.UInt32
System.UInt64
System.UIntPtr
System.Windows.Forms.ColorDialog.Color
System.Windows.Media.Animation.KeyTime
System.Windows.Media.Animation.RepeatBehavior
System.Xml.Serialization.XmlDeserializationEvents
Windows.Foundation.Point
Windows.Foundation.Rect
Windows.Foundation.Size
Windows.UI.Color
Windows.UI.Xaml.Controls.Primitives.GeneratorPosition
Windows.UI.Xaml.CornerRadius
Windows.UI.Xaml.Duration
Windows.UI.Xaml.GridLength
Windows.UI.Xaml.Media.Matrix
Windows.UI.Xaml.Media.Media3D.Matrix3D
Windows.UI.Xaml.Thickness
De .NET Core 3.0- en hoger-runtimes op macOS geven nu de voorkeur aan OpenSSL 1.1.x-versies voor OpenSSL 1.0.x-versies voor de AesCcm typen , , AesGcm , DSAOpenSsl ECDiffieHellmanOpenSsl , ECDsaOpenSsl RSAOpenSsl en SafeEvpPKeyHandle typen.
De .NET Core 2.1-runtime ondersteunt nu OpenSSL 1.1.x-versies, maar geeft nog steeds de voorkeur aan OpenSSL 1.0.x-versies.
Voorheen gebruikte de .NET Core-runtime OpenSSL 1.0.x-versies op macOS voor typen die communiceren met OpenSSL. De meest recente Versie van OpenSSL 1.0.x, OpenSSL 1.0.2, is nu niet meer ondersteund. Als u typen wilt behouden die Gebruikmaken van OpenSSL voor ondersteunde versies van OpenSSL, gebruiken de .NET Core 3.0- en latere runtimes nu nieuwere versies van OpenSSL op macOS.
Met deze wijziging is het gedrag voor de .NET Core-runtimes in macOS als volgt:
De runtimes van .NET Core 3.0 en hoger gebruiken OpenSSL 1.1.x, indien beschikbaar, en vallen alleen terug op OpenSSL 1.0.x als er geen 1.1.x-versie beschikbaar is.
Voor bellers die gebruikmaken van de OpenSSL-interoptypen met aangepaste P/Invokes, volgt u de richtlijnen in de SafeEvpPKeyHandle.OpenSslVersion opmerkingen. Uw app loopt mogelijk vast als u de OpenSslVersion waarde niet controleert.
De .NET Core 2.1-runtime maakt gebruik van OpenSSL 1.0.x, indien beschikbaar, en valt terug op OpenSSL 1.1.x als er geen 1.0.x-versie beschikbaar is.
De runtime 2.1 geeft de voorkeur aan de eerdere versie van OpenSSL, omdat de SafeEvpPKeyHandle.OpenSslVersion eigenschap niet bestaat in .NET Core 2.1, dus de OpenSSL-versie kan niet betrouwbaar worden bepaald tijdens runtime.
.NET Core 2.1.16
.NET Core 3.0.3
.NET Core 3.1.2
Core .NET-bibliotheken
De .NET Core 2.1 SDK bevat nu algemene CLI-hulpprogramma's en u hoeft niet langer naar deze hulpprogramma's van het project te verwijzen.
In .NET Core 2.0 verwijzen projecten naar externe .NET-hulpprogramma's met de <DotNetCliToolReference>
projectinstelling. In .NET Core 2.1 zijn sommige van deze hulpprogramma's opgenomen in de .NET Core SDK en is de instelling niet meer nodig. Als u verwijzingen naar deze hulpprogramma's in uw project opneemt, wordt er een foutbericht weergegeven dat lijkt op het volgende: het hulpprogramma Microsoft.EntityFrameworkCore.Tools.DotNet is nu opgenomen in de .NET Core SDK.
Hulpprogramma's die nu zijn opgenomen in .NET Core 2.1 SDK:
Tabel uitvouwen
<DotNetCliToolReference-waarde>
Hulpprogramma
Microsoft.DotNet.Watcher.Tools
dotnet-watch
Microsoft.Extensions.SecretManager.Tools
dotnet-user-secrets
Microsoft.Extensions.Caching.SqlConfig.Tools
dotnet-sql-cache
Microsoft.EntityFrameworkCore.Tools.DotNet
dotnet-ef
.NET Core SDK 2.1.300
Verwijder de <DotNetCliToolReference>
instelling uit uw project.
MSBuild
N.v.t.