Home / Blog

.NET 9 vs .NET 8: What Is New and Why Upgrade

Carlos Casalicchio · June 9, 2026 ·6 min read

The .NET Release Cadence Keeps Accelerating

Microsoft shipped .NET 9 in November 2024 as a Standard Term Support (STS) release, and the velocity of improvement shows no signs of slowing. With over 7,500 pull requests merged into the dotnet/runtime repository alone, .NET 9 is the fastest and most capable release of the platform to date.

But "fastest" is abstract. As developers, we need to know: what actually changed, what makes our code better, and is it worth the upgrade?

This guide breaks down every meaningful improvement from .NET 8 to .NET 9 — from C# 13 language features to runtime performance gains, AI integration, and ASP.NET Core enhancements — so you can make an informed decision for your team.

C# 13: Language Features You'll Actually Use

C# 13 ships with the .NET 9 SDK and introduces several features that reduce boilerplate and improve safety:

params Collections

Previously, params was limited to arrays. C# 13 extends params support to any collection type that implements IEnumerable<T> and has an Add method — including List<T>, Span<T>, and ReadOnlySpan<T>. This eliminates unnecessary array allocations when calling methods with variable arguments.

New Lock Type and Semantics

The System.Threading.Lock type replaces the traditional lock (obj) { } pattern with a dedicated type that the compiler recognizes. The new lock keyword works with Lock objects to produce more efficient code with improved debugging support.

ref struct Interfaces

ref struct types can now implement interfaces and be used as type arguments in generics. This unlocks patterns like high-performance span-based abstractions that were previously impossible due to type constraints.

Partial Properties and Indexers

Partial properties and indexers are now allowed in partial types, making source generators more expressive. Library authors can declare partial properties in generated code while implementations live in user code — a pattern that dramatically simplifies source-generator-driven architectures.

Overload Resolution Priority

Library authors can now designate one overload as better than others using the [OverloadResolutionPriority] attribute. This eliminates ambiguous-call compiler errors when adding new overloads to existing APIs without breaking consumers.

Implicit Indexer Access in Object Initializers

You can now use the ^ operator (index-from-end) in object initializers, making collection initialization more expressive when populating from the end of a sequence.

Runtime Performance: Every Cycle Counts

.NET 9's performance story is built on hundreds of targeted improvements that compound in real applications. Here are the highlights:

Dynamic PGO: Now Optimizing Casts and Branches

Dynamic Profile-Guided Optimization (PGO) — introduced in .NET 8 — now extends beyond virtual dispatch to include cast optimizations. The JIT tracks the most common types encountered during obj is T and (T)obj operations, then generates fast paths for those types. In micro-benchmarks, type-checking operations run up to 4x faster on common paths.

Loop Optimizations: Strength Reduction and Downward Counting

The JIT now performs strength reduction on array iteration loops, converting index-based access into pointer arithmetic. Combined with automatic downward counting (replacing cmp + jl with a single jns), tight loops shed one instruction per iteration. For hot-path loops over large collections, this adds up fast.

Bounds Check Elimination: Smarter Than Ever

The JIT's bounds check analysis now handles previously missed patterns — reverse indexing, complex loop conditions, and span-based accesses that interact with earlier length checks. Fewer bounds checks means tighter loops and fewer branches that can mispredict.

Garbage Collection: Dynamic Adaptation

Server GC now includes dynamic adaptation to application size, enabled by default. The GC adjusts its behavior based on the application's actual memory patterns rather than fixed heuristics, reducing pause times for memory-intensive workloads without sacrificing throughput.

Vectorization and Arm64

Arm64 code generation received significant attention, with expanded SIMD vectorization and better use of Arm-specific instructions. For cloud workloads running on Graviton or Ampere processors, this translates directly to lower compute costs.

ASP.NET Core 9: Secure by Default, Faster by Design

ASP.NET Core 9 makes security improvements automatic while pushing the performance ceiling higher:

Built-in OpenAPI Document Generation

The new Microsoft.AspNetCore.OpenApi package provides built-in OpenAPI document generation without requiring Swashbuckle or NSwag. Metadata from minimal APIs, controllers, and type annotations is automatically reflected in generated OpenAPI specs — reducing dependency churn and improving compatibility.

Static Asset Fingerprinting

Build-time and publish-time optimization of static files (JavaScript, CSS) now includes automatic fingerprinted versioning. Cache-busting becomes automatic, eliminating a common source of stale-asset bugs.

Blazor Improvements

New Hybrid and Web App templates simplify project setup. Component render mode detection improves debugging. The reconnection experience for Blazor Server has been redesigned, providing users with a smoother experience when network connections drop.

Native AOT Expansion

Ahead-of-time compilation support in ASP.NET Core has been extended, reducing cold-start latency and memory footprint. For containerized microservices, Native AOT means smaller images and faster scale-out events.

Linux HTTPS Development Certificate

Setting up a trusted development certificate on Linux for HTTPS during development is now significantly easier — a quality-of-life improvement for teams developing on Linux workstations.

AI Building Blocks: .NET Goes Native with AI

.NET 9 introduces a unified AI abstraction layer, positioning .NET as a first-class platform for AI-powered applications:

Microsoft.Extensions.AI

A set of C# abstractions for interacting with AI services — small and large language models (SLMs and LLMs), embeddings, and vector stores. These packages provide a consistent programming model whether you're calling OpenAI, Azure OpenAI, or local models through ONNX Runtime.

Tensor<T> and TensorPrimitives

The new Tensor<T> type provides efficient multi-dimensional data manipulation with zero-copy interop with ML.NET, TorchSharp, and ONNX Runtime. TensorPrimitives expanded from 40 to nearly 200 SIMD-optimized operations — covering the numerical primitives needed for inference and feature engineering.

ML.NET 4.0

ML.NET 4.0 brings ONNX model loading as Stream, new tokenizer support for GPT, Llama, Phi, and Bert models, and experimental TorchSharp ports of Llama and Phi model families. If you're building .NET applications that need on-device or in-process AI inference, this is the release that makes it practical.

Tokenizers Library

The Microsoft.ML.Tokenizers library now supports Tiktoken (GPT-3/4/4o/o1), Llama, CodeGen, Phi2, and Bert tokenizers out of the box. This is essential for managing context windows, calculating token costs, and preprocessing text for local models.

EF Core 9: Cosmos DB and Pre-Compiled Queries

Entity Framework Core 9 focuses on two areas: deeper Azure Cosmos DB for NoSQL integration and groundwork for ahead-of-time compilation:

  • Cosmos DB Provider: Significant updates for the NoSQL provider, including improved LINQ translation, hierarchical partition key support, and better throughput management.
  • Pre-Compiled Queries: Steps toward AOT-compiled queries that eliminate the runtime query compilation overhead — critical for cold-start performance in serverless and containerized environments.
  • Complex Type Improvements: Better handling of owned entities and value objects, reducing the boilerplate needed for rich domain models.

.NET MAUI: Performance and Desktop Integration

.NET MAUI in .NET 9 prioritizes performance and desktop capabilities:

  • CollectionView and CarouselView received new, more performant implementations on iOS and Mac Catalyst.
  • HybridWebView enables easier embedding of React, Vue.js, or Angular content inside MAUI apps.
  • TitleBar control for Windows desktop applications, providing native title bar customization.
  • Native AOT and Trimming improvements reduce app size and startup time on mobile.

.NET 8 vs .NET 9: Side-by-Side Comparison

Category .NET 8 .NET 9
Release Type LTS (3 years support) STS (2 years support)
C# Version C# 12 C# 13
Dynamic PGO Virtual/interface dispatch Adds casts, branches, integer profiling
AI Abstractions None (NuGet packages only) Microsoft.Extensions.AI, Tensor<T>
OpenAPI Third-party (Swashbuckle) Built-in Microsoft.AspNetCore.OpenApi
GC Mode Fixed server/workstation Dynamic adaptation to app size
ref struct Cannot implement interfaces Can implement interfaces, used as generic args
Loop Optimizations Basic loop recognition Strength reduction, downward counting
LINQ Standard operators Adds CountBy, AggregateBy
Native AOT Limited ASP.NET support Expanded ASP.NET support

Should You Upgrade?

Upgrade Immediately If:

  • You're running performance-sensitive workloads and can benefit from the JIT, GC, and loop optimizations.
  • You're building AI-powered features — the new Microsoft.Extensions.AI abstractions and tokenizer support are worth the migration alone.
  • You're deploying on Arm64 (Graviton, Ampere) — the Arm64 code generation improvements directly reduce cloud costs.
  • You maintain NuGet libraries — C# 13 features like [OverloadResolutionPriority] and partial properties improve the library authoring experience.

Consider the Schedule If:

  • You require LTS support — .NET 8 remains supported through November 2027. If your organization requires LTS for compliance, plan your .NET 10 (LTS) migration instead while adopting .NET 9 for new projects.
  • You depend on third-party packages that haven't yet added .NET 9 targets — verify your critical dependencies support net9.0 before migrating.

For nopCommerce and Umbraco Users:

  • nopCommerce 4.90 targets .NET 9 natively — if you're on 4.80 or earlier, upgrading to 4.90 gives you all these improvements automatically.
  • Umbraco 14+ runs on .NET 9 — all SplatDev's 20+ Umbraco plugins have been migrated and tested for .NET 9 compatibility.

Upgrade Path: A Practical Checklist

  1. Install .NET 9 SDK: Download from dotnet.microsoft.com.
  2. Update Target Framework: Change <TargetFramework>net8.0</TargetFramework> to <TargetFramework>net9.0</TargetFramework> in all .csproj files.
  3. Update Package References: Upgrade all NuGet packages to their latest versions that support .NET 9.
  4. Address Breaking Changes: Review the official breaking changes list — the surface area is small for most applications.
  5. Enable New Features: Set <LangVersion>13</LangVersion> to use C# 13 features.
  6. Run Your Test Suite: Full regression across unit, integration, and E2E tests.
  7. Benchmark Before/After: Use BenchmarkDotNet to quantify performance improvements in your specific workload.

The Bottom Line

.NET 9 is not a headline-grabbing revolutionary release. It's the kind of release that quietly makes everything better — your loops run with fewer instructions, your type checks hit fast paths, your GC adapts to your application, and your API specs generate automatically. These improvements compound across every HTTP request, every database query, every Blazor render cycle.

For teams still on .NET 6 or .NET 7, the cumulative delta from .NET 6 to .NET 9 is dramatic — performance gains of 20-40% on common workloads, a modernized C# language, built-in AI integration, and a container-optimized runtime.

At SplatDev, we've been building on .NET since version 1.0 in 2009. We've seen the platform grow from Windows-only to truly cross-platform, from closed-source to fully open, from enterprise-only to cloud-native. .NET 9 represents the most capable version of the platform we've ever worked with — and we're already shipping production workloads on it.

Ready to upgrade your .NET stack? SplatDev provides .NET migration services, performance optimization, and full-stack development — from nopCommerce and Umbraco to custom enterprise applications.

Talk to Our .NET Team

Or contact us directly: contact@splatdev.com

Want more articles like this?

Subscribe for updates on .NET, Umbraco, nopCommerce, and software engineering.

Get in touch →