Best of .NETJuly 2025

  1. 1
    Article
    Avatar of collectionsCollections·44w

    Building MCP Servers and Clients From Scratch: A Comprehensive Guide

    Model Context Protocol (MCP) is a communication framework for AI client-server interactions built around four components: tools, resources, prompts, and samplings. The guide covers building MCP servers and clients using TypeScript with Node.js, including integration with GitHub Copilot and debugging with MCP Inspector. It also explores .NET 10's native MCP support for creating AI assistant extensions, featuring weather and random number tools, with streamlined publishing to NuGet for community distribution and dependency management.

  2. 2
    Article
    Avatar of csharpcornerC# Corner·46w

    Polymorphic deserialization in .NET 8.0

    .NET 8 introduces built-in support for polymorphic JSON serialization and deserialization through JsonPolymorphic and JsonDerivedType attributes. This eliminates the need for workarounds when handling inheritance hierarchies in JSON processing. The feature uses a discriminator field to identify the correct derived type during deserialization, making it easier to work with polymorphic objects in APIs, message processing, and document storage scenarios.

  3. 3
    Video
    Avatar of nickchapsasNick Chapsas·42w

    The New Best Scheduling Library in .NET

    TickerQ is a new open-source scheduling library for .NET that aims to replace Hangfire and Quartz.NET by combining their best features while addressing their limitations. The library offers a dashboard interface, Entity Framework Core persistence, compile-time safety with source generators, true async support, and dependency injection. It supports both time-based and cron-based job scheduling, allows programmatic job creation through APIs, and provides comprehensive error handling with retry mechanisms. The tutorial demonstrates setting up TickerQ with PostgreSQL, creating scheduled jobs, and using the web dashboard to manage and monitor job execution.

  4. 4
    Article
    Avatar of medium_jsMedium·43w

    Real-Time Server-Sent Events in ASP.NET Core and .NET 10

    Server-Sent Events (SSE) in .NET 10 provide a lightweight alternative to SignalR for one-way real-time communication from server to client. The new TypedResults.ServerSentEvents API enables streaming data over HTTP with built-in reconnection support and Last-Event-ID handling. SSE works over plain HTTP, requires minimal setup, and is ideal for live feeds, notifications, and progress tracking where bidirectional communication isn't needed. The implementation includes creating async enumerable streams, handling reconnections, and consuming events via JavaScript's EventSource API.

  5. 5
    Article
    Avatar of bartwullemsThe Art of Simplicity·46w

    Getting started with AI development in .NET

    Microsoft's AI Dev Gallery is an open-source Windows application that helps developers integrate AI capabilities into their .NET projects. It features over 25 interactive samples powered by local AI models, allows easy downloading of models from Hugging Face and GitHub, and provides C# source code with the ability to export standalone Visual Studio projects. The app includes sections for samples, models, and Windows AI APIs, making it a comprehensive starting point for AI development on Windows.

  6. 6
    Article
    Avatar of devblogsDevBlogs·46w

    Local AI + .NET = AltText Magic in One C# Script

    A practical guide showing how to generate image alt text using .NET 10's new script execution feature and local AI models via Ollama. The tutorial demonstrates creating a complete solution in a single C# file that can analyze images and produce accessibility-friendly descriptions without cloud dependencies or rate limits.

  7. 7
    Article
    Avatar of dotnet.NET Blog·44w

    .NET 10 Preview 6 is now available!

    .NET 10 Preview 6 introduces enhancements across the runtime, SDK, and libraries including strict JSON serialization options, post-quantum cryptography support, platform-specific .NET tools, and one-shot tool execution. ASP.NET Core and Blazor receive improvements like automatic memory pool eviction, WebAssembly preloading, passkey support for Identity, and better form validation. .NET MAUI adds MediaPicker enhancements and WebView request interception, while Android support extends to API levels 35 and 36. Windows Forms, WPF, and Entity Framework Core focus on quality improvements and build performance optimizations.

  8. 8
    Article
    Avatar of dotnet.NET Blog·43w

    Choosing the Right Copilot Experience for .NET

    GitHub Copilot Chat offers two distinct modes for .NET developers: Ask Mode for quick conversational support and code examples without workspace interaction, and Agent Mode for intelligent codebase analysis and direct file modifications. Ask Mode excels at explaining concepts, providing code snippets, and answering general questions, while Agent Mode handles refactoring, test generation, bug fixes, and automated tasks within your actual project files. The choice depends on whether you need conceptual guidance or hands-on code manipulation.

  9. 9
    Article
    Avatar of andrewlock.NET Escapades·44w

    C# 14 extension members; AKA extension everything

    C# 14 introduces extension members, expanding beyond traditional extension methods to support static extension methods, static and instance extension properties, and extension operators. The new syntax uses extension blocks with receiver parameters, allowing developers to add static methods directly to types and create extension properties. While the syntax requires more nesting and may appear unfamiliar, it provides better alignment between how extensions are defined and used, with all existing extension methods remaining compatible.

  10. 10
    Video
    Avatar of nickchapsasNick Chapsas·45w

    Logging correctly in .NET

    String interpolation in .NET logging creates unnecessary allocations even when logging is disabled. Structured logging using message templates with parameters is more efficient, avoiding allocations and formatting costs while maintaining queryable logs in tools like Kibana and Application Insights.

  11. 11
    Article
    Avatar of devblogsDevBlogs·42w

    Building AI Agents with the A2A .NET SDK

    Microsoft announces the A2A .NET SDK, implementing the Agent2Agent protocol for building collaborative AI agents. The SDK enables .NET developers to create agents that can discover each other's capabilities, communicate through messages or tasks, and support real-time streaming. The tutorial demonstrates building a simple echo agent with ASP.NET Core integration, showing both synchronous and asynchronous communication patterns. The SDK strengthens the AI ecosystem by providing standardized agent-to-agent communication, particularly benefiting Azure AI Foundry and Semantic Kernel users.

  12. 12
    Article
    Avatar of andrewlock.NET Escapades·45w

    Behind the scenes of dotnet run app.cs

    .NET 10 introduces the ability to run single C# files without a .csproj using `dotnet run app.cs`. Behind the scenes, the SDK creates a virtual project file in memory by parsing #: directives for packages, properties, and SDKs, then uses MSBuild to restore and build the application. The implementation includes caching mechanisms to avoid unnecessary rebuilds and handles various edge cases through target overrides to work around NuGet limitations with in-memory projects.