Best of .NETMarch 2025

  1. 1
    Article
    Avatar of bartwullemsThe Art of Simplicity·1y

    Goodbye sln!

    With .NET 9 SDK (9.0.200), Microsoft introduces a new XML-based solution file format (.slnx), replacing the older .sln files. The .slnx file is simpler and cleaner, eliminating issues related to GUIDs. Users can enable this feature through the Visual Studio Preview Features settings, migrate existing .sln files, or create new ones using the 'dotnet new sln --format slnx' command. However, the .slnx format is currently not supported in VSCode but works in JetBrains Rider.

  2. 2
    Article
    Avatar of dotnet.NET Blog·1y

    .NET AI Template Now Available in Preview

    The .NET AI Template is now available in preview, providing an easy way to start building AI-powered chat applications using Visual Studio, Visual Studio Code, or the .NET CLI. The template supports chat with custom data, integration with local vector stores or Azure AI Search, and customizable code for various functionalities. You can utilize the generated code to handle data ingestion and customize the chatbot's behavior. Future plans include expanding template offerings and gathering user feedback to shape future versions.

  3. 3
    Article
    Avatar of freecodecampfreeCodeCamp·1y

    How to Use TestContainers in .Net

    Learn how to simplify integration testing in .NET using the TestContainers library. This guide covers setting up TestContainers for database testing, managing container lifecycles, and optimizing test performance. Discover how to use various TestContainers strategies, including per-test, per-test-class, and per-multiple-test-classes setups, with practical examples utilizing xUnit. Additionally, explore how to create multiple containers for complex integration tests and use custom Docker images to streamline your testing process.

  4. 4
    Article
    Avatar of andrewlock.NET Escapades·1y

    Running an ASP.NET Core app inside IIS in a Windows container

    The post explains how to run an ASP.NET Core app inside IIS within a Windows container. It covers installing the AspNetCoreModule for IIS integration, using APPCMD and PowerShell to create app pools and websites, and employing ServiceMonitor.exe to monitor an app pool. It also highlights specific challenges and solutions related to managing app pool startup and troubleshooting common errors.

  5. 5
    Article
    Avatar of infoworldInfoWorld·1y

    The key new features in .NET 10

    Microsoft has released the first preview of .NET 10, focusing on performance and reliability improvements. Key updates include an enhanced JIT engine in the runtime, devirtualization of array interfaces, and support for new x64 instructions. ASP.NET Core in .NET 10 now treats Blazor scripts as static assets and embraces OpenAPI 3.1.1 for better API documentation. New features like numeric string sorting and improved zip archive support aim to boost developer productivity.

  6. 6
    Article
    Avatar of milanjovanovicMilan Jovanović·1y

    Options Pattern Validation in ASP.NET Core With FluentValidation

    Learn how to use FluentValidation with the Options Pattern in ASP.NET Core to validate configuration at startup, providing a robust alternative to Data Annotations for complex scenarios. The integration includes implementing custom IValidateOptions, creating extension methods, and ensuring validation through the ValidateOnStart method. This validation process helps catch configuration errors early, improving application reliability.

  7. 7
    Article
    Avatar of milanjovanovicMilan Jovanović·1y

    Better Request Tracing with User Context in ASP.NET Core

    Adding user context to request tracing in ASP.NET Core enhances troubleshooting, performance monitoring, and user behavior analysis. The post explains how to implement middleware that enriches logs with user IDs, improving the ability to track user journeys and quickly identify issues. It also discusses handling PII concerns and suggests expanding context enrichment with feature flags and tenant information.

  8. 8
    Article
    Avatar of milanjovanovicMilan Jovanović·1y

    Streamlining .NET 9 Deployment With GitHub Actions and Azure

    Milan Jovanović explains how to set up a CI/CD pipeline for .NET 9 applications using GitHub Actions and Azure App Service. The guide includes a detailed workflow that builds, tests, and deploys applications. It covers automation of tasks like database migrations and code coverage, offering practical tips from real-world deployments. The aim is to make deployment processes reliable and efficient.

  9. 9
    Video
    Avatar of nickchapsasNick Chapsas·1y

    .NET has an AI problem

    The focus of an upcoming .NET conference revolves around AI, emphasizing various applications of AI in .NET. Key highlights include using AI-powered services, AI integration tips, and showcasing new AI features and demos. Tutorials on Blazor and AI implementation in .NET applications will also be featured.

  10. 10
    Video
    Avatar of nickchapsasNick Chapsas·1y

    When to Use Classes and Structs in .NET

    Nick explains the difference between classes and structs in .NET, focusing on their memory allocation behaviors and performance implications. He provides code examples and discusses when it makes sense to use each, highlighting that classes are reference types allocated on the heap, whereas structs are value types typically allocated on the stack. The post also emphasizes that structs should be small to avoid performance issues related to memory copying.

  11. 11
    Article
    Avatar of milanjovanovicMilan Jovanović·1y

    How .NET Aspire Simplifies Service Discovery

    .NET Aspire simplifies the development of distributed applications by employing a configuration-based approach for service discovery. This method reduces the complexity and maintenance associated with traditional service discovery methods. In addition, it offers seamless integration with the .NET ecosystem and supports scalable solutions like API gateways with YARP.

  12. 12
    Video
    Avatar of nickchapsasNick Chapsas·1y

    You NEED To Update Your Tests in .NET

    Testing in .NET is undergoing significant changes with the release of xUnit version 3. This update introduces numerous new features, including project templates, configuration files, and enhanced test execution capabilities. The package update requires migrating to a new package rather than a simple version upgrade. The Microsoft Testing Platform is a new lightweight alternative to older testing frameworks, now supported in xUnit v3. Features like test pipeline startup, assembly fixtures, and improved assertions make testing more efficient and flexible. Additionally, there are improvements in test context handling, including adding warnings and attachments to test results.

  13. 13
    Article
    Avatar of infoworldInfoWorld·1y

    Microsoft .NET 10 Preview 2 shines on C#, runtime, encryption

    Microsoft has released .NET 10 Preview 2, featuring improvements in C# 14, encryption, and the .NET runtime. Key updates include enhancements to the JIT compiler's devirtualization capabilities, new ExportPkcs12 methods for encryption, and upgrades to the dotnet CLI tool. Additional improvements cover Blazor Web App project templates, .NET for Android and iOS, WPF performance, and NativeAOT apps' startup time and memory footprint.

  14. 14
    Article
    Avatar of infoqInfoQ·1y

    .NET Team Announces Release of HybridCache Library for .NET 9

    HybridCache, a new .NET 9 library, enhances data storage and retrieval by combining in-memory and distributed caches. It improves application speed, simplifies development tasks, and offers features like cache-stampede protection and tag-based invalidation. It supports cache backends such as Redis and SQL Server, and is compatible with older .NET runtimes.