0 167

Microsoft Releases .NET 9

Categories: Microsoft Technologies
Microsoft Releases .NET 9

.NET 9 introduces a range of features and improvements aimed at enhancing performance, security, and developer productivity. Key updates include:

Runtime Enhancements:

  • Feature Switches with Trimming Support: New attributes enable defining feature switches, allowing unused code to be excluded during trimming, optimizing application size and performance.
  • Dynamic Garbage Collection: The garbage collector now adapts dynamically to application sizes, improving memory management efficiency.

Library Updates:

  • System.Text.Json:
    • Support for nullable reference type annotations.
    • Ability to export JSON schemas from types.
    • Options to customize JSON indentation and read multiple root-level JSON values from a single stream.
  • LINQ Enhancements: Introduction of CountBy and AggregateBy methods for aggregating state by key without allocating intermediate groupings.
  • Cryptography:
    • New one-shot hash method on CryptographicOperations.
    • Introduction of classes utilizing the KMAC algorithm.
  • Reflection: Addition of PersistedAssemblyBuilder for saving emitted assemblies, including support for emitting symbol information for debugging.
  • TimeSpan Enhancements: New From* methods allow the creation of TimeSpan objects from integers, reducing errors from floating-point imprecision.

SDK and Tooling Improvements:

  • Workload Sets: Ensures workloads remain at a specific version until explicitly updated, providing greater control over development environments.
  • Tool Roll-Forward Option: Users can now decide if .NET tools should run on newer runtime versions, enhancing flexibility.
  • Unit Testing Enhancements: Improved MSBuild integration allows running tests in parallel, optimizing testing workflows.
  • NuGet Security Audits: By default, audits now include both direct and transitive package references, bolstering security.
  • Terminal Logger: Enabled by default with usability improvements, including summarized counts of failures and warnings at the end of builds.
  • MSBuild Script Analyzers ("BuildChecks"): New analyzers help detect defects and regressions in build scripts.
  • Analyzer Mismatch Detection: The SDK can detect and adjust for version mismatches between the .NET SDK and MSBuild, preventing potential issues.

Language Updates:

  • C# 13:
    • Introduction of params collections.
    • New lock type and semantics.
    • Enhanced method group natural type inference.
    • Implicit indexer access in object initializers.
    • Support for ref locals and unsafe contexts in iterators and async methods.
    • Allowing ref struct types to implement interfaces and as arguments for type parameters in generics.
    • Partial properties and indexers in partial types.
    • Overload resolution priority attribute for better overload selection.
  • F# 9:
    • Support for nullable reference types.
    • New discriminated union .Is* properties.
    • Enhancements to active patterns and computation expressions.
    • Various productivity, performance, and tooling improvements.

Framework and Tooling Updates:

  • ML.NET 4.0: Adds support for additional tokenizers, including Tiktoken, and models like Llama and CodeGen, enhancing machine learning capabilities.
  • .NET Aspire:
.net aspire 9
Introduces an opinionated, cloud-ready stack for building observable, production-ready, distributed applications, delivered through a collection of NuGet packages.

ASP.NET Core: 

asp.net core
Includes improvements to Blazor, SignalR, minimal APIs, OpenAPI, and authentication and authorization mechanisms.
  • .NET MAUI: Focuses on product quality enhancements and introduces new features for cross-platform app development.
  • Entity Framework Core: Updates include significant enhancements to the Azure Cosmos DB provider, steps towards AOT compilation, and pre-compiled queries.
  • Windows Presentation Foundation (WPF): Adds support for Windows 11 theming and hyphen-based ligatures, improving desktop application aesthetics.

These updates in .NET 9 aim to provide developers with more robust, efficient, and secure tools for modern application development.

Comments:

Please log in to be able add comments.