.NET Preview 7 Adds XAML Source Generator |
Monday, 25 August 2025 | |||
The latest preview of .NET 10, the platform created from a combination of .NET Framework and .NET Core, has been released. New in this version are a source generator for XAML in .NET MAUI, and PipeReader support for the JSON serializer.
There are several improvements to .NET MAUI in this preview, starting with the addition of a new XAML source generator that the developers say improves build performance and enables better tooling support. This generator creates strongly-typed code for your XAML files at compile time, reducing runtime overhead and providing better IntelliSense support. The source generator decorates generated types with the [Generated] attribute for better tooling integration and debugging support. The MediaPicker can now handle EXIF data automatically, which should mean images are correctly oriented. SafeArea support has also been "significantly improved", with an enhanced SafeAreaEdges control for precise safe area behavior control; and better behavior on iOS, including extra bottom space in ScrollView when using SafeAreaEdges. This release also introduces WebSocketStream, a new API designed to simplify some of the most common WebSocket scenarios in .NET. The release notes for the new API say that traditional WebSocket APIs are low-level and require significant boilerplate for tasks such as handling buffering and framing, reconstructing messages, managing encoding/decoding, and writing custom wrappers to integrate with streams, channels, or other transport abstractions. The developers say these complexities make it difficult to use WebSockets as a transport, especially for apps with streaming or text-based protocols, or event-driven handlers. WebSocketStream is designed to overcome these problems by providing a Stream-based abstraction over a WebSocket. This enables seamless integration with existing APIs for reading, writing, and parsing data, whether binary or text, and reduces the need for manual plumbing. This preview is also now feature complete for C# 14. The release notes say that any features available only in later previews will be gated behind feature flags. That enables a longer feedback cycle for any additional features. .NET 10 Preview 7 is available for download now. More InformationRelated Articles.NET 10 Preview 6 Improves Blazor Support Visual Studio 2022 v17.12 Preview 1 With .NET 9 .NET MAUI Toolkit Adds Offline Speech Recognition .NET 9 Preview 6 Improves ARM64 Code Generation .NET 8 Final Preview Improves ASP.NET Core To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info support for JSON serializer |