Best of .NETJanuary 2026

  1. 1
    Article
    Avatar of atomicobjectAtomic Spin·20w

    CancellationToken in C# – Pitfalls and Winning Patterns

    CancellationToken in C# simplifies managing long-running jobs but has important limitations. Key lessons: tokens cannot be persisted outside memory, different libraries implement cancellation differently (Parallel.ForEachAsync immediately kills running tasks), and tokens don't automatically handle server restarts or deployments. While CancellationToken provides a solid foundation for graceful job cancellation, applications must be built to handle its boundaries and quirks, particularly around persistence, library-specific behaviors, and infrastructure-level shutdowns.

  2. 2
    Article
    Avatar of sdtimesSD Times·19w

    XAML Studio is now open source

    Microsoft has open sourced XAML Studio, a developer tool for rapidly prototyping UWP XAML interfaces. The tool offers live editing, binding debugger, IntelliSense, and other development features. Originally created in 2017 as XamlPad+ during a hackathon, it last had a public release in 2019. The project now exists under the .NET Foundation as a seed project, with version 2 in development focusing on back-end improvements and WinUI 3 support rather than major new tooling features.

  3. 3
    Article
    Avatar of usmancodeUsmanCode·17w

    I got tired of architectural advice that ignores trade-offs

    A developer shares their frustration with architecture content that presents solutions without explaining trade-offs or constraints. They've created a public architecture notebook documenting architectural decisions, alternatives, trade-offs in .NET systems, and small runnable proofs. The repository emphasizes pragmatic, opinionated guidance that acknowledges real-world compromises and is open to revision based on experience.

  4. 4
    Article
    Avatar of infoqInfoQ·16w

    Microsoft Adds Custom Copilot Agents for .NET Developers with C# and WinForms Experts

    Microsoft and GitHub launched the first .NET-focused GitHub Copilot custom agents: C# Expert and WinForms Expert. These agents provide specialized assistance for C# best practices, async/await patterns, testing workflows, and Windows Forms UI development. Developers can activate them by placing agent instruction Markdown files in a `.github/agents` folder. The C# Expert enforces modern coding standards and minimizes code bloat, while the WinForms Expert prevents accidental modifications to `.Designer.cs` files. Both agents are experimental and represent a shift toward domain-specific AI assistance with persistent behavior profiles tied to repository context.

  5. 5
    Article
    Avatar of csharpcornerC# Corner·18w

    Why ASP.NET Core Feels Fast Locally but Slow in Production

    ASP.NET Core applications often run fast locally but slow in production due to environment differences, resource constraints, database query inefficiencies, async/await misuse, excessive logging, cold starts, improper caching, and network latency. The guide covers common bottlenecks like EF Core N+1 queries, thread pool starvation from blocking calls, logging overhead, in-memory cache limitations in scaled environments, and HttpClient socket exhaustion. It provides code examples showing problematic patterns versus optimized alternatives, emphasizing measurement-driven optimization: timing requests and database queries, checking thread pool health, reducing allocations, and implementing distributed caching before scaling infrastructure.

  6. 6
    Video
    Avatar of fireshipFireship·18w

    .NET in 100 seconds

    .NET is a free, open-source platform for building high-performance software across web, mobile, enterprise, and gaming domains. Originally Windows-centric, it evolved through .NET Core (2016) to modern .NET (2020) with cross-platform support. The platform uses the Common Language Runtime for memory management and supports multiple languages (C#, F#, Visual Basic) that compile to Common Intermediate Language. Its ecosystem includes ASP.NET, Blazor, Entity Framework Core, MAUI, and integrates with frameworks like Unity and AutoCAD. A simple console app example demonstrates basic C# syntax for user input validation.

  7. 7
    Article
    Avatar of gcpGoogle Cloud·16w

    Introducing Google Cloud Vertex AI Extensions for .NET

    Google Cloud announces the Google.Cloud.VertexAI.Extensions library, enabling .NET developers to integrate Gemini models on Vertex AI through Microsoft.Extensions.AI abstractions. The library provides a unified API for multi-provider AI applications, supporting chat, embeddings, and image generation. It complements the existing Google Gen AI .NET SDK by offering flexibility for developers who need to work with multiple AI providers (Google, OpenAI, Azure) while maintaining consistent code patterns. The library is currently in beta and includes code samples for common use cases.

  8. 8
    Article
    Avatar of aarononthewebAaronontheweb·16w

    Why Your Software Sucks: Inheritance

    Deep inheritance hierarchies create unmaintainable codebases through cognitive overload and "everything touches everything" architectures. The author examines real-world examples including a five-layer inheritance hierarchy for a payment page and an 866-line generic repository, demonstrating how preemptive framework design leads to rigid abstractions that resist change. The solution is to extract patterns after solving problems multiple times, prefer composition over inheritance, and remain skeptical of deep hierarchies beyond two or three layers.

  9. 9
    Article
    Avatar of freecodecampfreeCodeCamp·17w

    How to Implement Type Safe Unions in C# With OneOf

    OneOf is a C# library that implements discriminated unions, allowing methods to return one of several predefined types in a type-safe manner. Unlike tuples that bundle multiple values together, OneOf represents a choice between types (A or B or C), with compiler-enforced exhaustive handling through the .Match() method. The library provides a cleaner alternative to exception-driven control flow, inheritance hierarchies, and marker interfaces. Common use cases include polymorphic return types without inheritance, state machines with rich data per state, multi-channel notifications, file format handling, and explicit error handling. The approach makes failures explicit in method signatures, improves code readability, and eliminates entire categories of bugs by forcing developers to handle all possible cases at compile time.

  10. 10
    Article
    Avatar of jetbrainsJetBrains·17w

    Rider 2026.1 Early Access Program Is Now Open!

    Rider 2026.1 Early Access Program is now available with several new features. Key additions include Azure DevOps repository cloning, NuGet Package Manager Console with PowerShell command support, mixed-mode debugging for managed and native code on Windows, a .NET Disassembler plugin for inspecting assembly output, enhanced Godot Editor integration via a new addon, improved Natvis expression evaluation for C++ debugging, and more flexible C++ naming rules configuration. The EAP build is free to use and available for download.

  11. 11
    Article
    Avatar of csharpcornerC# Corner·17w

    Event-Driven Architecture in .NET Core Using RabbitMQ

    Event-Driven Architecture (EDA) enables building scalable, resilient, and loosely coupled applications through asynchronous communication. RabbitMQ serves as a message broker implementing AMQP, providing reliable message delivery, flexible routing, and easy .NET integration. The pattern involves producers publishing events to exchanges, which route messages to queues where consumers process them asynchronously. Best practices include using meaningful event names, making events immutable, handling failures with retries and dead-letter queues, avoiding tight coupling between services, and using JSON for payloads. While EDA offers advantages like scalability and fault isolation, challenges include debugging complexity and eventual consistency.

  12. 12
    Article
    Avatar of rhdevRed Hat Developer·19w

    How to deploy .NET applications with systemd and Podman

    .NET applications can be deployed as systemd services using containerization. The .NET SDK's PublishContainer target creates container images that can be distributed via registries or tarballs. Podman quadlets simplify systemd service creation by generating service files from specialized container unit files. The Microsoft.Extensions.Hosting.Systemd package enables proper integration with systemd for startup signaling, shutdown handling, and journal logging. Rootless containers use user namespace mapping to isolate container users, and host directories can be mounted with proper SELinux labels and ownership. Services can run under dedicated user accounts for additional isolation.

  13. 13
    Article
    Avatar of milanjovanovicMilan Jovanović·16w

    Containerize Your .NET Applications Without a Dockerfile

    .NET SDK (since version 7) includes built-in support for publishing applications directly to container images without writing a Dockerfile. Using a single `dotnet publish` command with the `/t:PublishContainer` flag, developers can build, containerize, and optionally push their applications to registries. The SDK automatically selects appropriate base images, handles multi-stage builds, and allows customization through MSBuild properties like image names, tags, base images, and ports. This approach eliminates Dockerfile maintenance overhead while providing sensible defaults for most web APIs and background services, though complex scenarios requiring system dependencies or custom build steps may still need traditional Dockerfiles.

  14. 14
    Article
    Avatar of devclassDEVCLASS·16w

    WebAssembly gaining adoption "behind the scenes" as technology advances • DEVCLASS

    WebAssembly adoption is growing steadily, with usage increasing from 4.5% to 5.5% of sites in 2025. Safari has improved its support, bringing many Wasm 3.0 features like native garbage collection to cross-browser compatibility. This enables more languages (Java, Kotlin, Dart, Scala) to compile to Wasm. Microsoft's .NET 10 improved AOT compilation for smaller downloads and faster performance. Key use cases include embedded devices, edge computing on CDN platforms, and running PHP/WordPress. The main challenge ahead is ECMAScript module integration to simplify Wasm loading, though the technology's "behind the scenes" nature makes its popularity less visible than it actually is.

  15. 15
    Article
    Avatar of weaviateWeaviate·18w

    Announcing the Weaviate C# Client

    Weaviate has released an official C# client library (v1.0.0) for .NET developers. The client features a collection-centric API design, strong typing with generic support, fluent chainable filtering, integrated vector search and RAG capabilities, dependency injection support, and comprehensive error handling. Key features include automatic connection management, type-safe schema generation from C# classes, backup/restore functionality, and seamless integration with modern .NET applications. The library is available via NuGet and aims to provide a native, intuitive experience for building AI-powered applications in the .NET ecosystem.

  16. 16
    Article
    Avatar of dotnet.NET Blog·18w

    .NET and .NET Framework January 2026 servicing releases updates

    .NET 10.0.2, 9.0.12, and 8.0.23 servicing releases are now available as of January 9, 2026, containing non-security fixes across Runtime, ASP.NET Core, SDK, WinForms, WPF, and Entity Framework Core. No new updates are available for .NET Framework this month. Detailed changelogs are available on GitHub for each component and version.

  17. 17
    Article
    Avatar of dotnet.NET Blog·18w

    How We Synchronize .NET’s Virtual Monorepo

    The .NET team built a Virtual Monolithic Repository (VMR) that aggregates source code from dozens of standalone repositories into a single git repository for unified builds. The VMR uses a custom two-way synchronization algorithm based on git patches to keep changes flowing between product repositories and the monorepo. The synchronization evolved through three stages: tarball-based Source Build, read-only VMR-lite with one-way sync, and finally a writable VMR with bidirectional flow. The team encountered challenges with conflicting changes, branch lifecycle mismatches, and metadata corruption, ultimately settling on a rebase-based approach that handles conflicts interactively. This infrastructure now powers .NET SDK builds starting from .NET 10 Preview 4.

  18. 18
    Article
    Avatar of andrewlock.NET Escapades·19w

    Recent updates to NetEscapades.EnumGenerators: new APIs and System.Memory support

    NetEscapades.EnumGenerators version 1.0.0-beta19 introduces several enhancements: an EnumParseOptions struct that allows disabling number parsing and supports any StringComparison type, a SerializationOptions struct enabling automatic ToLowerInvariant/ToUpperInvariant transformations at compile time, and ReadOnlySpan<char> API support for .NET Standard 2.0 and .NET Framework projects via the System.Memory package. These updates improve performance and flexibility when working with enums while maintaining backward compatibility through options objects that avoid API proliferation.