C# (.NET) Conference: Main Announcements of 2024
The recently concluded annual conference .NET Conf 2024 once again confirmed Microsoft's status as one of the leaders in the world of modern development. The event gathered thousands of developers from around the world and delivered numerous announcements that will fundamentally change the approach to writing code in C#. We have compiled the most important new features that every .NET developer should know about.
1. .NET 9: AOT Compilation and Performance
The main technological shift is the final transition to native AOT (Ahead-of-Time) compilation. While AOT was previously only available for limited scenarios, in .NET 9 it becomes the primary mode for most types of applications.
- Startup speed: applications compile to machine code instantly, without JIT delays.
- Binary size: reduced to 2-5 MB by removing unnecessary metadata.
- Memory optimization: the new garbage collector (GC) for AOT reduces RAM consumption by up to 40%.
This makes C# an ideal language for cloud functions (AWS Lambda, Azure Functions) and microservices.
2. Artificial Intelligence (AI) Integration
Microsoft announced built-in support for AI models directly within the .NET ecosystem. Developers can now use ML.NET 4.0 and Semantic Kernel without additional packages.
- LLM clients: native support for OpenAI, Azure OpenAI, and local models (LLaMA, Mistral).
- AI agents: a new API for creating Chain-of-Thought call chains in C#.
- Code autocompletion: Visual Studio 2024 introduced an AI assistant that writes tests and refactors code.
3. C# 13: New Language Features
Along with the platform, a new version of the language was released — C# 13. Key changes:
- Fields in interfaces: fields can now be declared directly in interfaces (previously only properties).
- Enhanced collections: new syntax for
List<T>andDictionary<T>with initialization via the spread operator... - Primary Constructors for all types: writing the constructor directly in the class declaration (similar to record).
4. Blazor and WebAssembly: A New Standard
Blazor received the long-awaited Blazor United update, combining server-side rendering and WebAssembly in a single project. Now you can:
- Automatically choose where to execute code (on the server or client).
- Use full AOT for Blazor WebAssembly — performance comparable to native applications.
- Integrate JavaScript libraries via the new JSImport mechanism.
5. Tools and Ecosystem
The conference also announced new tools for developers:
- .NET Aspire 2.0: a framework