Slide 1

Slide 1 text

What’s new and coming in .NET Jon Galloway @jongalloway [email protected]

Slide 2

Slide 2 text

Build anything with a unified platform WEB MOBILE GAMING IoT AI DESKTOP CLOUD .NET TOOLS Visual Studio Code CLI Visual Studio Family OPERATING SYSTEM Linux Windows macOS + ECOSYSTEM Components, tools, library vendors NuGet GitHub +

Slide 3

Slide 3 text

Get Current with .NET 7 Get ready for .NET 8

Slide 4

Slide 4 text

.NET 6.0 LTS released Nov 2021 Major releases every year in November LTS for even numbered releases .NET Schedule Nov 2021 .NET 6.0 LTS Nov 2022 .NET 7.0 Nov 2023 .NET 8.0 LTS Nov 2024 .NET 9.0 Nov 2025 .NET 10.0 LTS

Slide 5

Slide 5 text

Visual Studio + Command Line Analyzers and code fixers Ability to analyze binaries UWP to Windows App SDK Xamarin to .NET 7 & .NET MAUI .NET Upgrade Assistant 178K+ >4x

Slide 6

Slide 6 text

Every app can upgrade to the latest .NET WPF UWP upgrade to WinUI 3 Xamarin.Forms upgrade to .NET MAUI WCF upgrade to .NET 7 with Core WCF ASP.NET upgrade to ASP.NET Core libraries .NET Framework & .NET -> .NET Standard2.0 Only from .NET 7 -> upgrade to .NET 7 WinForms, upgrade to .NET 7 with

Slide 7

Slide 7 text

Use Visual Studio to set up an ASP.NET Core migration project YARP proxies requests from the new ASP.NET Core app to the existing ASP.NET app as needed Migrate endpoints to ASP.NET Core one at time including any dependencies Continue maintaining & developing your ASP.NET app while upgrading Incrementally upgrade to ASP.NET Core Learn more |

Slide 8

Slide 8 text

Incremental Migration to ASP.NET Core YARP proxy System.Web Adapters

Slide 9

Slide 9 text

Adapters for System.Web HttpContext HttpContext.Current HttpResponse HttpRequest HttpSessionState HttpCookie HttpCookieCollection … and more

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

.NET App Modernization Resources

Slide 12

Slide 12 text

Slide 13

Slide 13 text

.NET 7 Highlights Native support for ARM64 Enhanced .NET support on Linux Build cross-platform mobile & desktop apps from same codebase Improvements to API performance Easy to build & deploy distributed cloud native apps Simplify and write less code with C#11 HTTP/3 and minimal APIs improvements for cloud native apps Dev Tunnels to easily develop and debug cloud API integrations Configure, Build, Publish containers via .NET SDK - CLI and VS (coming soon) Unified Modern Simple Productive

Slide 14

Slide 14 text

Performance Improvements in every release .NET 5 250+ .NET 6 550+ .NET 7 1000+ Performance-related improvements

Slide 15

Slide 15 text

Azure Cosmos DB Exchange Online 30-65% CPU 5x throughput 85% P95 latency 26% CPU 80% P99 latency 20% Heap size Azure App Service  80% throughput Large  in CPU Enable gRPC & HTTP/2 Microsoft Graph 70B requests / day 37% CPU 91% Operational costs Azure Active Directory 185B requests / day 67% CPU 50% app efficiency Microsoft Teams 50 projects, 700+ APIs 25% CPU 60% P99 latency Microsoft Graph's Journey to .NET 6 The Azure Cosmos DB Journey to .NET 6 Azure Active Directory's gateway is on .NET 6.0! Exchange Online Journey to .NET Core Microsoft Teams' journey to .NET Core Microsoft Teams Assignments Service's Journey to .NET 6 A Heavy Lift: Bringing Kestrel + YARP to Azure App Services .NET at Microsoft Teams upgrading to the

Slide 16

Slide 16 text

Syntactic simplifications, less boilerplate Generic math support List patterns Required members Raw string literals General availability in .NET 7 Simplify your code with C# 11

Slide 17

Slide 17 text

Modern web with .NET Runtime • HTTP/3 & Faster HTTP/2 uploads • ARM64 support for Kestrel & IIS • Rate Limiting • Output caching APIs • Auth Improvements with JWT • Route grouping • Enhanced OpenAPI support • gRPC JSON transcoding Web UI • Blazor custom elements • Data binding get/set/after modifiers • WebAssembly SIMD • Experimental QuickGrid

Slide 18

Slide 18 text

Continuous focus on improvement: Plaintext: 8% more RPS JSON: 16% more RPS Fortunes: 25% more RPS .NET 7 Performance - API Source: 999.9K 1.16M 1 2 +16% Tech Empower JSON

Slide 19

Slide 19 text

Distributed transactions Mapping to JSON columns for SQL SaveChanges performance and bulk updates Custom reverse engineering templates Stored procedures for insert/update/delete .NET Data and Entity Framework Core New Features in .NET 7 Source: 1.7ms .43ms 1 2 4 Rows - SaveChangesAsync 4x faster Time to insert multiple rows milliseconds (lower is better)

Slide 20

Slide 20 text

High performance cross-platform contract-first cloud native APIs Requests Per Second (Higher is Better) Source: gRPC Java 68.9K Go 72.5K C++ 89.4K Rust 96.1K .NET 7 99.8K

Slide 21

Slide 21 text

.NET REST APIs – Minimal Lightweight, single-file, cloud native APIs Low ceremony, top-level C# programs Easy to get started Scale to any app size

Slide 22

Slide 22 text

Organize groups of endpoints Leverage endpoint filters for validation, logging, and much more Improved testing and OpenAPI docs .NET REST APIs – Powerful

Slide 23

Slide 23 text

.NET REST APIs – Secure .NET 6 .NET 7

Slide 24

Slide 24 text

.NET 7 – Rate Limiting Middleware public class MyController : Controller { [EnableRateLimitingAttribute("MyControllerPolicy")] public IActionResult Index() { return View(); } } app.MapGroup("/public/todos").RequireRateLimiting("MyGroupPolicy");

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

.NET Unified .NET Mobile, desktop, hybrid Productive development One Base Class Library Type Unification CLI Support SDK Style Projects Modern Support Lifecycle Android iOS WinUI Mac Catalyst Blazor WebView Single Project Microsoft.Extensions .NET Hot Reload XAML Hot Reload Visual Diagnostics .NET MAUI Windows Mac Catalyst Android iOS macOS iOS .NET MAUI Build all in one framework

Slide 27

Slide 27 text

.NET MAUI Momentum 18.8K 1.8K 636%

Slide 28

Slide 28 text

Blazor in .NET 7 Blazor Hybrid with .NET MAUI Custom elements Handle location changing events Bind after/get/set modifier Dynamic authentication requests Improved JavaScript interop on WebAssembly WebAssembly SIMD & exception handling …and much more!

Slide 29

Slide 29 text

✅ Get Current with .NET 7 👀 Get ready for .NET 8

Slide 30

Slide 30 text

Source Generators .NET Future Interceptors AOT

Slide 31

Slide 31 text

Before Native AOT Published Size 88.3 MB Working Set 235 MB Startup 182 ms RPS 668K Published Size 88.7 MB Working Set 231 MB Startup 287 ms RPS 707K

Slide 32

Slide 32 text

Progress so far Published Size 8.04 MB Working Set 33 MB Startup 27 ms RPS 689K Published Size 7.49 MB Working Set 45 MB Startup 54 ms RPS 670K

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Route Tooling • Syntax Highlighting • Autocomplete • Analyzers and Fixers

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

MVC & Razor Pages Blazor in .NET 8: The best of server & client Blazor Server-side rendering (SSR) 🚀 Client-side rendering (CSR) 🎮 Blazor

Slide 37

Slide 37 text

Server-side rendering GET HTML Blazor

Slide 38

Slide 38 text

Streaming rendering GET HTM L Blazor SQL HTML Loading…

Slide 39

Slide 39 text

Enhanced navigation & form handling fetch Blazor HTML

Slide 40

Slide 40 text

Choose render mode at runtime Blazor WebSocket

Slide 41

Slide 41 text

Full stack web UI with Blazor Server-side rendering Enhanced navigation & form handling Streaming rendering Add client interactivity per component or page Choose component render mode at runtime

Slide 42

Slide 42 text

Generate static HTML content with components Use components for templating and static HTML rendering Render a component directly to a string or stream Render outside of the context of ASP.NET Core Investigating static site generation with Blazor post- .NET 8

Slide 43

Slide 43 text

New Blazor Web App template ✓ Best of Blazor Server & Blazor WebAssembly in one template ✓ Quickly get setup with server-side rendering (SSR) & progressive enhancements ✓ Easily enable Server & WebAssembly interactive render modes

Slide 44

Slide 44 text

.NET WebAssembly improvements SIMD & exception handling Multithreading Hot reload improvements Jiterpreter CSP compatibility Web-friendly packaging (Webcil)

Slide 45

Slide 45 text

Additional Blazor enhancements in .NET 8 QuickGrid Sections Route to named element Monitor circuit activity Improved authentication

Slide 46

Slide 46 text

APIs Form handling Problem details API development experience Helpful analyzers

Slide 47

Slide 47 text

Authentication and Authorization Improvements Client-friendly endpoints for identity management Support for tokens in self host scenarios (without OIDC server) Remove IdentityServer from templates (option for OIDC)

Slide 48

Slide 48 text

Self-hosted identity User Manager Role Manager Sign in Manager Client UI Endpoints Razor Page UI Users User Claims Roles User Logins

Slide 49

Slide 49 text

High-scale and high-availability services in .NET 8 Resilience Microsoft.Extensions.Resilience Microsoft.Extensions.Http.Resilience Adds fault injection and retry pipelines Compliance Microsoft.Extensions.Compliance.Abstractions Microsoft.Extensions.Compliance.Redaction Adds data classification and redaction Telemetry Microsoft.Extensions.Telemetry Microsoft.Extensions.Telemetry.Abstractions Microsoft.Extensions.Telemetry.Console Microsoft.Extensions.Http.Telemetry Primarily add Logging enhancements and meters/metrics

Slide 50

Slide 50 text

Visual Studio productivity features in Powered by LSP for C# Dev Kit for Visual Studio Code Included in and Solution & Project Management Test Explorer AI-assisted coding

Slide 51

Slide 51 text

C# 12

Slide 52

Slide 52 text

Get Current with .NET 7 Get ready for .NET 8

Slide 53

Slide 53 text

Follow .NET –

Slide 54

Slide 54 text

Get started with .NET 7 today! Try out the latest .NET 8 preview

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

Thank You! Let's build amazing apps with .NET 7