.NET 9 Consulting
- .NET 9 is a free, cross-platform development framework open-sourced by Microsoft. Released in November 2024, it focuses on performance, security, and cloud-native enhancements, enabling developers to build modern web, mobile, desktop, IoT, gaming, and AI-driven applications.
- Performance Enhancements: .NET 9 introduces dynamic garbage collection as the default, over 1,000 targeted performance improvements, Arm64 optimizations, and enhanced memory management, making it the fastest .NET release to date.
- AI Integration Simplified: Introduced in .NET 9, this framework simplifies AI integration by providing packages to work with large language models, embeddings, and vector stores, making it easier to build intelligent, AI-powered applications.
- ASP.NET Core and Blazor Upgrades: Significant improvements include enhanced Blazor features like hybrid app templates and dependency injection in Razor components, OpenAPI support, and optimized static file handling for streamlined web development.
- Entity Framework Core 9 Updates: Enhanced Azure Cosmos DB support with features like hierarchical partition keys, LINQ query improvements, and mandatory asynchronous I/O enable efficient, cloud-native data access for scalable applications.
- Awarded experts: Cazton team comprises of experts that have been awarded the Microsoft Regional Director and Most Valuable Professional awards. Our experts happen to be Azure insiders, ASP.NET advisors, Azure Cosmos DB insiders and Docker insiders.
- Top clients: At Cazton, we help Fortune 500, large, mid-size and startup companies with web and app development, deployment, consulting, recruiting services and hands-on training services. Our clients include Microsoft, Broadcom, Thomson Reuters, Bank of America, Macquarie, Dell and more.
The world of software development continues to evolve, and .NET 9, the latest standard-term support (STS) release, reflects this ongoing transformation. With a focus on performance, security, and cloud-native capabilities, .NET 9 introduces a range of enhancements and features designed to meet the needs of modern application development across web, mobile, AI, and cloud-driven platforms.
Building on the foundation of previous versions, .NET 9 refines existing tools while introducing new features like Unified AI Abstractions, performance optimizations, and improvements to ASP.NET Core and Entity Framework Core. This release aims to provide developers with the tools to create scalable, efficient, and secure applications that align with today’s technological demands. This overview highlights the key updates and improvements in .NET 9, offering a clear perspective on how they contribute to modern development practices.
What's New in .NET 9
- Performance Redefined: .NET 9 pushes the boundaries of application speed and efficiency. With dynamic garbage collection replacing Server GC as the default, applications now benefit from memory management that dynamically adapts to workload size. Further improvements include Arm64 optimizations and enhanced loop performance, alongside over 1,000 targeted enhancements in areas like inlining and memory management, making .NET 9 the fastest release to date.
- Unified AI Abstractions: .NET 9 makes integrating AI into applications easier with the introduction of Microsoft.Extensions.AI and Microsoft.Extensions.VectorData. These packages offer a unified framework for working with AI services, embeddings, and vector databases. The addition of new tensor types, like TensorPrimitives ensures efficient handling of multi-dimensional data, which is essential for AI workloads. Plus, seamless integration with Azure OpenAI services enhances .NET 9's capabilities for AI development, making it a powerful choice for developers.
- ASP.NET Core & Blazor Enhancements: ASP.NET Core in .NET 9 introduces an array of powerful features aimed at boosting productivity and performance for developers. Blazor sees significant upgrades, including a hybrid app template, enhanced server rendering, and a more resilient reconnection process for Blazor Server applications. Razor components benefit from better dependency injection, making it easier to build modular applications. The integration of OpenAPI for API documentation and expanded support for native AOT compilation improves the developer experience for API-driven applications. New project templates, including those for Blazor applications and .NET MAUI, simplify multi-platform development. Additionally, optimized static file handling at build and publish time, such as automatic fingerprinted versioning for CSS and JavaScript, streamlines deployment workflows. With improvements in startup time, memory efficiency, and enhanced monitoring and tracing capabilities, ASP.NET Core in .NET 9 ensures a secure, high-performing foundation for modern web development.
- Hybrid Cache API: Aimed at modernizing cache management, the Hybrid Cache API combines the capabilities of distributed and memory cache implementations into a single, cohesive interface. This API simplifies caching workflows, making it a reliable choice for developers working on scalable, high-performance applications.
- Entity Framework Core 9 Updates: EF Core 9 brings transformative improvements to its Azure Cosmos DB provider, enhancing scalability and performance for NoSQL-based, cloud-native applications. The provider now excels at identifying partition key comparisons in LINQ queries and optimizing them by targeting only the relevant partitions, which significantly boosts query efficiency and reduces request unit (RU) consumption. Moreover, EF Core 9 fully supports hierarchical partition keys, enabling up to three levels of partitioning for improved performance and cost-effectiveness. Query translations have been refined, utilizing optimizations like the EXISTS function for conditional evaluations, which reduces database interaction overhead. Additionally, improved mapping to align with JSON-based document standards ensures seamless interoperability with other systems accessing Azure Cosmos DB. While these advancements introduce breaking changes, APIs are available to restore pre-9.0 behavior if needed, providing flexibility for developers adapting to these updates.
- System.Text.Json Enhancements: Enhancements in System.Text.Json include nullable reference type annotations for safer and more predictable JSON handling. The ability to generate JSON schemas from types simplifies API documentation and integration, providing a more seamless developer experience when working with JSON data.
- Security and SDK Improvements: .NET 9 reinforces security with automatic vulnerability auditing in dotnet restore for both direct and transitive dependencies. Testing workflows are streamlined with parallel test execution across target frameworks, while the SDK now detects and resolves version mismatches between MSBuild and the .NET runtime to ensure smoother development.
- C# 13 Features: C# 13 introduces several updates that enhance developer productivity and versatility. The new params collection feature expands the flexibility of the `params` keyword by supporting a broader range of collection types. A new escape sequence, `\e`, has been added for defining escape codes, making certain string manipulations more concise. Developers can now use partial properties and indexers in partial types, simplifying code organization in large projects. Improvements to ref struct types, allow them to implement interfaces and be used as arguments in generics, unlocking advanced scenarios. Additionally, overload resolution priority empowers library authors to specify preferred method overloads, making APIs easier to use.
- Blazor and .NET MAUI Enhancements: Blazor sees updates that allow developers to detect a component’s execution location and interactivity mode, improving user experience in hybrid scenarios. .NET MAUI introduces new controls, including the Hybrid Web View and Title Bar Control for Windows, alongside numerous performance and quality improvements for cross-platform development.
- SignalR Advancements: SignalR in .NET 9 adds support for polymorphic types, enabling more complex data handling in SignalR hubs. Trimming and Native AOT support for both server and client implementations enhance deployment efficiency and reduce runtime overhead, making it a more robust solution for real-time communication.
- OpenAPI Integration: .NET 9 simplifies API documentation with new methods like AddOpenAPI and MapOpenAPI, allowing developers to generate OpenAPI specifications directly from Program.cs. Additionally, build-time generation of OpenAPI specifications via a NuGet package streamlines integration with API clients and documentation workflows.
.NET 9 and AI
.NET 9 ushers in a new era of AI-driven development, empowering developers to seamlessly integrate advanced AI capabilities into their applications. Central to this transformation are the newly introduced Microsoft.Extensions.AI and Microsoft.Extensions.VectorData libraries. These packages provide a unified, extensible framework for working with large language models (LLMs), embeddings, and vector databases, dramatically simplifying the integration of intelligent features into modern applications.
By leveraging these powerful abstractions, developers can create applications that interact effortlessly with AI services, enabling functionalities such as natural language processing, real-time recommendations, semantic search, and personalized user experiences. The streamlined support for Azure OpenAI services further amplifies the potential of .NET 9, making it a natural choice for enterprises seeking to incorporate AI capabilities at scale.
Key AI Advancements in .NET 9
- Unified AI Abstractions: Developers can now work with large language models and embeddings using a single, consistent API, reducing complexity and enabling faster development of intelligent applications. The framework's extensibility ensures compatibility with both Azure OpenAI and other AI platforms, supporting a wide range of use cases.
- Optimized Tensor Handling: With the introduction of TensorPrimitives and improved support for multi-dimensional data, .NET 9 delivers efficient performance for AI workloads. These improvements are particularly significant for tasks involving deep learning, data analysis, and high-dimensional vector operations.
- Cloud-Native AI Integration: Built with cloud-native principles in mind, .NET 9 seamlessly integrates AI features with Azure Machine Learning, Azure AI Services, and Azure Cosmos DB for vector search. This integration enables developers to deploy AI-driven applications that are scalable, reliable, and capable of handling real-world demands.
- Enhanced Performance and Efficiency: .NET 9 leverages dynamic garbage collection and Arm64 optimizations to handle the computational demands of AI workloads. These improvements reduce latency and enhance throughput, enabling AI models to perform faster and more efficiently.
- Enterprise-Ready AI Applications: From automated workflows to intelligent chatbots, .NET 9 equips businesses with the tools needed to build enterprise-grade AI solutions. Its robust security features, including vulnerability auditing and dependency management, ensure that applications remain secure while scaling AI capabilities.
With its unified abstractions and seamless Azure integration, .NET 9 eliminates many of the barriers traditionally associated with AI development. Organizations can now harness the power of advanced AI with less overhead, faster deployment cycles, and more accessible tools. Whether developing a semantic search engine, implementing predictive analytics, or embedding natural language capabilities into apps, .NET 9 provides the solid foundation developers need to innovate and stay ahead in an increasingly AI-driven world.
Cazton’s team of seasoned professionals is uniquely positioned to help you unlock the full potential of .NET 9 and Azure for your AI initiatives. Whether you’re integrating AI into existing workflows or building new, cutting-edge solutions, our experts can guide you every step of the way.
Performance Improvements in .NET 9
.NET 9 brings many performance improvements designed to boost efficiency, reduce memory usage, and give developers access to powerful new APIs. While there are many changes, we are highlighting the key ones. These improvements include better runtime optimizations and new APIs that enable developers to build faster, high-performance applications. Here's a detailed overview:
Picture Credit: Microsoft Dev Blogs
- Three Key Categories of Performance Improvements: Performance improvements in .NET 9 can be grouped into three main categories.
- Upgrade and Get Faster: Upgrading to .NET 9 automatically improves the performance of existing applications. Enhancements in the Just-In-Time (JIT) compiler, garbage collector (GC), and framework libraries mean better runtime efficiency with no extra work. Methods, properties, and types across the framework have been optimized for faster execution.
- Recompilation Benefits: Applications recompiled with .NET 9 benefit from better code generation due to improvements in compilers (C#, F#, VB, etc.), resulting in more efficient execution.
- New APIs for Enhanced Performance: .NET 9 introduces new APIs that allow developers to fine-tune performance. These APIs offer greater control to reduce memory allocations and improve execution speed.
- GetAlternateLookup API: The new GetAlternateLookup API allows efficient dictionary lookups using alternate key types. It's available for core collections like: Dictionary, ConcurrentDictionary, FrozenDictionary, HashSet, and FrozenSet. This API reduces memory allocations by allowing alternate key types (e.g., ReadOnlySpan<char>) to work with dictionaries that typically require string keys. For example, a dictionary with string keys can now perform lookups with ReadOnlySpan<char> without allocating new strings. Scenarios involving frequent dictionary lookups, like word counting in large datasets, show reduced memory usage and faster execution. This feature required updates to the runtime, libraries, and C# language to support ref struct types as generic parameters.
- EnumerateSplits API: The new EnumerateSplits API offers an allocation-free alternative to the commonly used String.Split method. String.Split allocates memory for both the result array and the individual string segments, leading to high memory usage in some scenarios. This API operates on spans and provides ranges instead of allocating strings enabling developers to work directly with slices of the original input. It supports both character-based separators and regular expressions, making it ideal for tasks like tokenizing text or parsing words. This approach eliminates memory allocation, dropping usage to zero megabytes in many cases, and significantly improves execution speed.
- CollectionsMarshal Enhancements: The CollectionsMarshal class has been improved with the addition of the GetValueRefOrAddDefault method. This method retrieves a reference to a dictionary value or adds a default value if the key doesn't exist. It avoids multiple lookups and allows direct manipulation of the dictionary's values. While memory-safe, developers must be careful. If the dictionary is resized after retrieving the reference, it could result in invalid references. For tasks like histogram generation, this reduces the number of dictionary lookups from two to one, saving execution time.
- SearchValues for Strings: Building on the SearchValues API introduced in .NET 8, .NET 9 extends its support to strings, enabling high-performance multi-substring search. Developers can define a set of strings and efficiently search for any of them in a larger string or span. The framework precomputes the search data and selects the best algorithm for optimal performance. This API supports SIMD (Single Instruction, Multiple Data) vectorization for faster processing. Regular expressions also use SearchValues internally, so developers benefit without needing to call the API explicitly. Searching for multiple substrings is now up to 200 times faster in certain scenarios, such as searching for days of the week in large text files.
- TensorPrimitives: The System.Numerics.Tensors library has been expanded with the new TensorPrimitives API. It includes over 250 vectorized methods for operations like addition, multiplication, and distance calculations on numeric data. It supports all primitive numeric types (e.g., float, double, int) and can be extended for custom types. By using hardware-accelerated SIMD processing, tasks like computing the Hamming Distance between byte arrays have seen execution times drop from 80 milliseconds to just 2 milliseconds.
- Dynamic Profile-Guided Optimization (PGO): Dynamic PGO, first introduced in earlier versions of .NET, has been further enhanced in .NET 9, allowing it to profile an application's runtime behavior more effectively and generate optimized code tailored to real-world usage, benefiting all .NET applications by enabling the JIT compiler to produce more efficient code.
.NET 9 introduces significant performance enhancements across the runtime, libraries, and language. With features like EnumerateSplits, GetAlternateLookup, and TensorPrimitives, developers can build faster and more efficient applications. The improvements in dynamic PGO and integration of these new APIs into high-level abstractions, such as regular expressions, make .NET 9 an excellent choice for creating high-performance, scalable solutions.
Cazton's team of experienced professionals specializes in optimizing performance of any application. Whether you're fine-tuning existing systems or designing high-performance, AI-driven solutions from the ground up, our experts are here to help you achieve unparalleled efficiency and scalability. We provide tailored strategies to ensure your solutions run faster, smarter, and more cost-effectively, empowering your business to maximize its potential.
What's New in ASP.NET Core 9?
ASP.NET Core in .NET 9 continues to push the boundaries of modern web development, delivering an impressive array of features and improvements designed to simplify full-stack development and enhance user experiences. With advancements in Blazor, SignalR, dependency injection, and OpenAPI support, this release focuses on boosting developer productivity and performance while meeting the demands of cloud-native applications. ASP.NET Core 9 provides developers with the tools needed to craft interactive, scalable, and secure applications that stand out in today's digital landscape.
Let's explore the key features and updates introduced in ASP.NET Core 9:
- Dynamic Blazor Enhancements: ASP.NET Core 9 expands Blazor's capabilities, introducing features like component interactivity mode detection and execution location awareness. These updates allow developers to optimize application performance by tailoring interactivity based on runtime environments. Improved server-side reconnection ensures seamless transitions for Blazor Server users, while dependency injection in Razor components streamlines code organization and testing. Additionally, enhanced QuickGrid functionality enables the creation of rich, interactive web interfaces with minimal effort.
- OpenAPI and API Improvements: The introduction of AddOpenAPI and MapOpenAPI methods in .NET 9 simplifies API documentation by enabling direct OpenAPI generation from the Program.cs file. For those working with RESTful services, this enhancement accelerates API development workflows and integrates effortlessly with modern client-generation tools. Build-time OpenAPI generation via a NuGet package further streamlines API specification management, making it easier for developers to maintain robust API documentation.
- SignalR Enhancements for Real-Time Communication: SignalR in .NET 9 introduces polymorphic type support, expanding the flexibility of real-time communication hubs. Additionally, trimming and Native AOT support for SignalR servers and clients reduce deployment overhead, enhance application scalability, and optimize performance for real-time applications.
- Dependency Injection Upgrades: ASP.NET Core 9 takes dependency injection a step further by supporting constructor injection in Razor components. This enhancement simplifies the integration of services, making component development more intuitive and maintainable. These updates align with modern development practices, reducing boilerplate code and increasing efficiency in codebases.
- Authentication and Authorization Advancements: ASP.NET Core 9 strengthens authentication for Blazor WebAssembly applications by enhancing the authentication state provider. This improvement simplifies identity management for secure, client-side applications while maintaining flexibility for developers to customize their implementations.
- Improved Development Experience: New project templates, including a .NET MAUI app and Blazor application templates, ensure developers have streamlined starting points for building modern web and cross-platform applications. Enhanced tooling within Visual Studio and support for Razor class libraries allow for shared component development, fostering reusable and modular code structures.
ASP.NET Core in .NET 9 delivers a well-rounded toolkit that bridges the gap between client interactivity and server reliability, empowering developers to create efficient, scalable, and engaging web applications. Whether you're enhancing real-time communications, optimizing Blazor components, or leveraging cutting-edge API tools, ASP.NET Core 9 sets a strong foundation for building the next generation of web applications.
What's New in Entity Framework Core 9?
Entity Framework Core 9 (EF Core 9) builds upon its predecessors with a focus on enhanced performance, scalability, and developer productivity, making it a powerful tool for modern data access needs. This release introduces significant updates, particularly in its support for Azure Cosmos DB, LINQ query improvements, and breaking changes that align the framework more closely with best practices in cloud-native and large-scale application development.
- Enhanced Azure Cosmos DB Support: EF Core 9 takes Azure Cosmos DB integration to the next level with optimizations that ensure better alignment with the database's underlying architecture. Key improvements include:
- Efficient Partition Key Handling: Queries now intelligently identify partition key comparisons, allowing operations to target only relevant partitions. This results in faster query performance and reduced costs by minimizing Request Unit (RU) consumption.
- Direct Point Reads: When filtering by partition key and document ID, EF Core 9 uses the highly efficient ReadItem API, ensuring the fastest possible reads for targeted data access.
- Support for Hierarchical Partition Keys: Developers can now define multi-level partition keys, enabling more granular data organization and improved scalability for applications with diverse data sets.
- Improved LINQ Query Translation: EF Core 9 expands its support for LINQ queries, offering broader compatibility with complex expressions and navigational queries. This allows developers to write more natural and expressive queries while relying on EF Core to generate optimized SQL commands that maximize performance.
- Breaking Changes to Consider: With its advancements, EF Core 9 introduces several breaking changes to streamline operations and improve future compatibility:
- Discriminator Property Naming: The default discriminator property in JSON documents has been renamed from Discriminator to $type. Applications relying on the old format will need updates to accommodate this change.
- Modified id Property Composition: The id property in Azure Cosmos DB documents no longer includes the discriminator value, instead containing only the key property value. This change simplifies key composition but may require adjustments in existing codebases.
- Mandatory Asynchronous I/O: Synchronous I/O operations are no longer supported in the Azure Cosmos DB provider, encouraging developers to fully embrace asynchronous programming for better performance and scalability.
- Additional Enhancements: EF Core 9 continues to deliver value with features that enhance the developer experience:
- Performance Optimizations: Across all providers, EF Core 9 includes targeted performance improvements, reducing query execution times and enhancing overall efficiency.
- Support for AOT Compilation: Ahead-of-Time (AOT) compilation capabilities are expanded, allowing developers to precompile queries for better runtime performance in constrained environments.
Entity Framework Core (EF Core) 9 represents a significant evolution in data access, particularly for developers leveraging Azure Cosmos DB or working on applications with demanding scalability requirements. With these updates, EF Core 9 equips developers to build data-driven applications that are more efficient, responsive, and aligned with modern best practices.
What's New in .NET MAUI for .NET 9
.NET Multi-platform App UI (.NET MAUI) in .NET 9 introduces several enhancements aimed at improving cross-platform application development. A key focus of this release is on product quality, with expanded test coverage, end-to-end scenario testing, and numerous bug fixes.
- Minimum Deployment Targets: .NET MAUI 9 requires minimum deployment targets of iOS 12.2 and Mac Catalyst 15.0 (macOS 12.0). The minimum deployment targets for Android and Windows remain unchanged.
- New Controls: Two new controls have been introduced:
- HybridWebView: This control enables hosting arbitrary HTML, JavaScript, and CSS content within a web view, facilitating communication between JavaScript code and the hosting C#/.NET code. This is particularly useful for integrating existing web applications into a .NET MAUI app.
- TitleBar for Windows: The TitleBar control allows developers to add a custom title bar to their Windows applications, providing greater flexibility in UI design.
- Control Enhancements: Several existing controls have been enhanced:
- BackButtonBehavior: The binding mode for IsVisible and IsEnabled properties is now BindingMode.OneWay, allowing for more dynamic control at runtime.
- BlazorWebView: On iOS and Mac Catalyst 18, the default behavior for hosting content in a BlazorWebView has been changed to localhost, improving performance and security.
- ContentPage: The HideSoftInputOnTapped property is now supported on Mac Catalyst, in addition to Android and iOS, enhancing user experience across platforms.
- Soft Keyboard Input Support: New soft keyboard input support has been added for Password, Date, and Time inputs on Editor and Entry controls, providing a more intuitive user experience.
- Text Alignment: The TextAlignment enumeration now includes a Justify member, allowing for justified text alignment in text controls, enhancing text presentation options.
These updates in .NET MAUI 9 aim to provide developers with more robust tools and greater flexibility in building cross-platform applications.
How Cazton Can Empower Your Success with .NET 9?
At Cazton, we're more than just advisors - we're your hands-on, results-driven partners who take full responsibility for delivering solutions that align with your vision. Our approach is rooted in execution, ensuring you don't just get expert recommendations but a fully implemented, high-performing solution tailored to your needs.
Why Cazton?
Our team includes globally recognized Microsoft Regional Directors and Most Valuable Professionals who bring unparalleled expertise in the Microsoft ecosystem and beyond. Trusted by top-tier clients such as Microsoft, Google, Bank of America, Broadcom, and Dell, we've consistently delivered innovative, scalable solutions that drive measurable success.
What We Deliver
- Custom Solutions Designed for You: We specialize in designing, architecting, and developing applications that provide an exceptional user experience while meeting your business goals.
- End-to-End Implementation: From development to deployment, automation, and cloud support, we handle the entire lifecycle of your .NET 9 applications so you can focus on your core business.
- Modernization & Migration: Whether you're upgrading from .NET Core, .NET 5, 6, 7, or 8 - or transitioning from legacy .NET Framework applications - we ensure a seamless migration to .NET 9 with no disruption to your operations.
- Performance Optimization: We identify bottlenecks and enhance your applications for peak performance, ensuring your systems are fast, reliable, and scalable.
- Best Practices in Development: Our team ensures your solutions are built with best practices in design, development, DevOps, architecture, and security to future-proof your investment.
- Technical Expertise You Can Rely On: We bring deep expertise in every layer of development, from frontend frameworks like Blazor, Angular, React, and Vue to backend technologies like ASP.NET Core, EF Core, SignalR, and gRPC. Our full-stack capabilities extend to hybrid and cross-platform solutions using .NET MAUI and Xamarin.
- Cloud & DevOps Excellence: We excel at deploying .NET 9 applications across cloud, multi-cloud, hybrid cloud, or on-premises environments. Our CI/CD pipelines ensure smooth automation, and we deliver fully automated microservices using Docker, Kubernetes, and Terraform.
- Code Reviews & Technical Mentorship: Through expert-led code reviews, we reduce technical debt and enhance productivity. We also provide tailored consulting and mentoring to upskill your team in leveraging .NET 9 for maximum impact.
- Custom Training Programs: We don't just deliver solutions - we empower your team with customized .NET 9 training, ensuring they can manage and extend your applications with confidence.
The Cazton Difference
Our hands-on approach ensures that we do the heavy lifting, taking responsibility for delivery and implementation. We're on the hook for your success - whether it's migrating legacy systems, building high-performance solutions, or optimizing cloud-native applications. With a proven track record of delivering complex projects within tight deadlines, we are here to make your vision a reality.
When you work with Cazton, you're choosing a team that doesn't just consult but collaborates, builds, and delivers solutions designed for your success. Our clients trust us to consistently deliver complex projects within tight deadlines. We have not only saved them millions of dollars but also demonstrated time and again our ability to exceed expectations, providing innovative solutions and unparalleled value. Let us help you turn your challenges into opportunities and your vision into results. Reach out today, and let's make it happen together!