2026-08-29 errorsdotnetcsharp Fix: CA1070 "Do not declare event fields as virtual" CA1070 fires on virtual field-like events. Drop the virtual, keep the event non-virtual, and let derived classes override a protected virtual OnXxx raiser instead.
2026-08-28 mcpai-agentsdotnet Fix: MCP9004, MCP9005 and MCP9006 warnings after upgrading the MCP C# SDK to 2.0 MCP9005 is advisory, but MCP9004 crashes at startup and stateless mode makes SampleAsync throw. Here is what each diagnostic means and how to fix it properly.
2026-08-28 migrationdotnetnuget Migrate a .NET solution to Central Package Management with Directory.Packages.props Move every package version out of your csproj files into one Directory.Packages.props. Covers a generator script that reconciles conflicting versions with real semver ordering, the before/after dependency-graph diff that proves what moved, NU1008/NU1010/NU1013/NU1507, transitive pinning, GlobalPackageReference, VersionOverride, and why a nested Directory.Packages.props silently shadows the root one.
2026-08-27 dotnetcsharpaspnetcore How to render a heading whose level (h1-h6) is chosen at runtime in a Blazor component Blazor has no syntax for a variable tag name, and DynamicComponent only renders component types. Override BuildRenderTree and call builder.OpenElement(0, $"h{level}"). Covers attribute splatting, why the tag name must be clamped before it reaches the DOM, why changing the level rips the element out of the DOM even with @key, and an auto-levelling variant built on a cascading value.
2026-08-23 csharplinqdotnet How to tell whether an IEnumerable<T> has already been materialized in C# There is no HasBeenEnumerated flag on IEnumerable<T>. Here is what TryGetNonEnumeratedCount actually checks, why Enumerable.Range passes an ICollection<T> test, and the guard that avoids a wasted ToList().
2026-08-23 how-tocsharpcsharp-14 How to write a static extension member that applies to every enum type in C# 14 Declare a generic extension block with a struct, Enum constraint and you get Status.Values, Status.Count, and Status.Parse on every enum in your solution. The receiver shape, the CS0704 and CS0428 traps, and why you must cache Enum.GetValues.
2026-08-23 ef-corelinqcsharp How to write reusable LINQ predicates that EF Core can translate in Where, Select, and OrderBy A bool helper method throws "could not be translated". An Expression<Func<T, bool>> does not. Here is how to compose, nest, and reuse expression trees in EF Core 11 without LINQKit, with the real SQL for every case.
2026-08-20 mcpagent-skillsmicrosoft-agent-framework How to Serve Agent Skills from an MCP Server in .NET with UseMcpSkills Stop shipping SKILL.md folders inside every agent deployment. Serve them from an MCP server and pull them with UseMcpSkills on Microsoft.Agents.AI.Mcp 1.18. Includes the exact skill://index.json shape, a working C# server, the wire trace, and the SEP-2640 drift that will bite you.
2026-08-19 dotnetsemantic-kernelai-agents Semantic Kernel 1.80.0 Stops OpenAPI Plugins From Following Redirects Semantic Kernel .NET 1.80.0 ships a breaking change: the OpenAPI plugin's default HttpClient no longer follows redirects, closing an SSRF bypass. Here is what changes and why your own HttpClient reopens the hole.
2026-08-18 errorsdotnetcsharp Fix: 'MapperConfiguration' does not contain a constructor that takes 1 arguments AutoMapper 15 removed the single-argument MapperConfiguration constructor. Pass an ILoggerFactory as the second argument, and add a config action to every AddAutoMapper call.