* .NET 10 Preview 6 * .NET 10 P6 - FSharp (#9946) * Update fsharp preview6 release notes with manual changes. * udpate for release * .NET 10 P6 - CSharp (#9943) * Add period to last sentence in csharp preview6 release notes. * update C# * .NET 10 P6 - EFCore (#9945) * Add period to last sentence in efcore preview6 release notes. * EF 10.0-preview.6 release notes * Added small improvements --------- Co-authored-by: Shay Rojansky <roji@roji.org> * .NET 10 P6 - WPF (#9952) * Add period to last sentence in aspnetcore preview6 release notes. * Add period to last sentence in containers preview6 release notes. * Add period to last sentence in csharp preview6 release notes. * Add period to last sentence in dotnetmaui preview6 release notes. * Add period to last sentence in efcore preview6 release notes. * Add period to last sentence in libraries preview6 release notes. * Add period to last sentence in runtime preview6 release notes. * Add period to last sentence in sdk preview6 release notes. * Add period to last sentence in visualbasic preview6 release notes. * Add period to last sentence in winforms preview6 release notes. * Add period to last sentence in wpf preview6 release notes. * Revert all changes except wpf.md in dotnet10-p6-wpf branch. * Add WPF info * update feature list --------- Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com> * .NET 10 P6 - WinForms (#9951) * Add period to last sentence in winforms preview6 release notes. * Update WinForms for Preview 6 * Apply suggestions from code review Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com> --------- Co-authored-by: Merrie McGaw <mmcgaw@microsoft.com> Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com> * .NET 10 P6 - SDK (#9949) * Add period to last sentence in sdk preview6 release notes. * CLI notes around tools and such * Add release notes for preview.6 run-file changes --------- Co-authored-by: Chet Husk <baronfel@users.noreply.github.com> Co-authored-by: Damian Edwards <damian@damianedwards.com> * .NET 10 P6 - Containers (#9942) * Add period to last sentence in containers preview6 release notes. * update to none udpates. * .NET 10 P6 - Runtime (#9948) * Add period to last sentence in runtime preview6 release notes. * Add JIT notes --------- Co-authored-by: Aman Khalid (from Dev Box) <amankhalid@microsoft.com> * .NET 10 P6 - .NET MAUI (#9944) * Add period to last sentence in dotnetmaui preview6 release notes. * Update dotnetmaui.md * adding more details for android * minor updates to iOS note * Update release-notes/10.0/preview/preview6/dotnetmaui.md Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> * Update release-notes/10.0/preview/preview6/dotnetmaui.md Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> * Update release-notes/10.0/preview/preview6/dotnetmaui.md Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> * added contributors from android and iOS repos --------- Co-authored-by: David Ortinau <david.ortinau@microsoft.com> Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> * .NET 10 P6 - Libraries (#9947) * Add period to last sentence in libraries preview6 release notes. * Update libraries.md * Update libraries.md Co-authored-by: Weihan Li <weihanli@outlook.com> * Update libraries.md fix link --------- Co-authored-by: Pranav Senthilnathan <pranas@microsoft.com> Co-authored-by: Weihan Li <weihanli@outlook.com> * Add ASP.NET Core release notes for .NET 10 Preview 6 (#9965) * update linter * revert * Fix link to installers and binaries for .NET 10 Preview 6 in README.md * update permissions? * Update release notes for .NET 10 Preview 6: enhance dark mode support in Windows Forms, improve JSON property handling in libraries, and refine CLI tool execution options in SDK. * Enhance release notes for .NET 10 Preview 6: update dark mode support in Windows Forms, improve formatting in EF Core and SDK documentation, and clean up whitespace in various markdown files. * cleanup * add p6 * lint * try this * Update releases.md * Update README.md * Update release-notes/README.md * Update releases-index.json * Update install-linux.md * Update install-macos.md * Update install-windows.md * Update releases.json * Update 10.0.0-preview.6.md * Added release.json * Mix lint errors in release.json for preview 6 release * Fix jsonlint errors * Fix jsonlint errors --------- Co-authored-by: Shay Rojansky <roji@roji.org> Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com> Co-authored-by: Merrie McGaw <mmcgaw@microsoft.com> Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com> Co-authored-by: Chet Husk <baronfel@users.noreply.github.com> Co-authored-by: Damian Edwards <damian@damianedwards.com> Co-authored-by: Aman Khalid (from Dev Box) <amankhalid@microsoft.com> Co-authored-by: David Ortinau <david.ortinau@microsoft.com> Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> Co-authored-by: Pranav Senthilnathan <pranas@microsoft.com> Co-authored-by: Weihan Li <weihanli@outlook.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: victorisr <victorisr@microsoft.com> Co-authored-by: Jon Galloway <jongalloway@gmail.com>
3.7 KiB
.NET Libraries in .NET 10 Preview 6 - Release Notes
Here's a summary of what's new in .NET Libraries in this preview release:
- Option to disallow duplicate JSON properties
- Strict JSON serialization options
- Post-Quantum Cryptography (PQC)
.NET Libraries updates in .NET 10:
- What's new in .NET 10 documentation
Option to disallow duplicate JSON properties
The JSON specification does not specify how to handle duplicate properties when deserializing a JSON payload. This can lead to unexpected results and security vulnerabilities. For example, see bishopfox.com JSON Interoperability Vulnerabilities and NVD CVE-2017-12635. This release introduces the AllowDuplicateProperties option to disallow duplicate JSON properties:
string json = """{ "Value": 1, "Value": -1 }""";
Console.WriteLine(JsonSerializer.Deserialize<MyRecord>(json).Value); // -1
JsonSerializerOptions options = new() { AllowDuplicateProperties = false };
JsonSerializer.Deserialize<MyRecord>(json, options); // throws JsonException
JsonSerializer.Deserialize<JsonObject>(json, options); // throws JsonException
JsonSerializer.Deserialize<Dictionary<string, int>>(json, options); // throws JsonException
JsonDocumentOptions docOptions = new() { AllowDuplicateProperties = false };
JsonDocument.Parse(json, docOptions); // throws JsonException
record MyRecord(int Value);
Duplicate detection works by checking if a value is assigned multiple times during deserialization, so it will work with as expected with other options like case-sensitivity and naming policy.
Strict JSON serialization options
The JSON serializer accepts many options to customize serialization and deserialization, but the defaults may be too relaxed for some applications. This release adds a new JsonSerializationOptions.Strict preset which follows best practices by including the following options:
- Applies the
JsonUnmappedMemberHandling.Disallowpolicy - Disables
AllowDuplicateProperties - Preserves case sensitive property binding
- Enables both
RespectNullableAnnotationsandRespectRequiredConstructorParameterssettings
These options are read-compatible with JsonSerializationOptions.Default - an object serialized with JsonSerializationOptions.Default can be deserialized with JsonSerializationOptions.Strict.
Post-Quantum Cryptography (PQC)
Windows announced Post-Quantum Cryptography support recently in a blog post and in this release we have started adding Windows CNG support to .NET. The following code from the previous release notes now also works on Windows versions with PQC:
using System;
using System.IO;
using System.Security.Cryptography;
private static bool ValidateMLDsaSignature(ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature, string publicKeyPath)
{
string publicKeyPem = File.ReadAllText(publicKeyPath);
using (MLDsa key = MLDsa.ImportFromPem(publicKeyPem))
{
return key.VerifyData(data, signature);
}
}
We are also working on adding downlevel support in Microsoft.Bcl.Cryptography to allow use in .NET Framework. Try out the feature now by installing a Windows Insider build (only available in the Canary Channel at this time).