RSSAmplifier

Blog

Start Debugging

Programming-related thoughts.

startdebugging.netRSS feed ↗745 posts

Latest posts

Flutter 3.47 Makes Impeller the Default Renderer on Windows, Linux, and macOS

Flutter 3.47.0 stable flips desktop apps from Skia to Impeller without touching a line of your runner code. Here is what moves, how to opt out on each platform, and why that opt-out is temporary.

How to download a file from a Blazor component without JavaScript interop

Skip the downloadFileFromStream JS module entirely. Render an anchor with the download attribute pointing at a minimal API endpoint that returns TypedResults.File, or POST a plain HTML form with an AntiforgeryToken. Covers why the download attribute is what stops Blazor's enhanced navigation from swallowing the click, why data-enhance silently discards the file, and the cookie-vs-bearer auth trap.

How to make System.Text.Json ignore a property that has the required modifier

[JsonIgnore] on a required member throws InvalidOperationException: marked required but does not specify a setter. Here is why the two features collide and the four ways to ignore the property anyway, measured on .NET 10.

How to Route MCP Traffic Through a Gateway With the Mcp-Method and Mcp-Name Headers

MCP 2026-07-28 mirrors the JSON-RPC method and target name into HTTP headers so a gateway can route, throttle, and audit without parsing the body. Here is a working gateway, plus the header-body agreement rule that will bite you.

System.IO.Compression Finally Reads and Writes Encrypted ZIPs in .NET 11 Preview 7

.NET 11 Preview 7 adds password-protected ZIP entries to System.IO.Compression, with AES-256 support, options types for whole-directory operations, and one empty-file bug that is already fixed in main.

Riverpod Notifier vs AsyncNotifier vs StreamNotifier in Flutter: which one do I extend?

Pick by the return type of build(): T means Notifier, FutureOr means AsyncNotifier, Stream means StreamNotifier. Here is the decision matrix, the type hierarchy that explains why, and the == filtering and state-clobbering gotchas that bite each one. Verified against flutter_riverpod 3.4.2 on Flutter 3.44.2.

Safe File-Write Tools for an Agent: Preview, Confirm, Apply

A write tool that asks before it writes needs three things the MCP SDK does not give you: an approval bound to the exact diff, a precondition on the file it previewed, and an integrity-protected requestState. Verified end to end on @modelcontextprotocol/server 2.0.0 against protocol revision 2026-07-28, including the argument-swap that gets past a naive confirm.

Scalar vs Swagger UI for OpenAPI documentation in ASP.NET Core 11

Scalar ships 1.02 MiB of gzipped JavaScript and a far better request builder. Swagger UI ships 514 KiB and renders OpenAPI 3.2, which is what .NET 11 now emits by default. Measured payloads, the 3.2 gap, endpoint routing on both sides, and the auth details that decide it.

Zstandard vs Brotli vs Gzip response compression in .NET 11

Zstandard is the right default for dynamic API responses in .NET 11, but not at the quality the ASP.NET Core provider ships with. Benchmarks on real JSON payloads showing why quality 1 beats the default quality 3 on both size and CPU, when Brotli still wins, and why Gzip survives only as a fallback.

Fix: An error occurred while preparing SDK package NDK (Side by side): Not in GZIP format

The SDK Manager is re-unpacking a corrupt archive it cached in .downloadIntermediates. Delete that folder and the half-extracted ndk/ directory, then re-run the build.

Fix: Google Play rejects a Flutter or .NET MAUI app for missing 16 KB memory page size support

Play rejects the bundle because a 64-bit .so still has 4 KB ELF segments. Find the offending library, rebuild it with NDK r28+, and verify with zipalign -P 16.

Fix: mprotect failed: 13 (Permission denied) in a Flutter iOS debug build

iOS blocks the Dart VM from flipping memory pages to executable, so JIT dies at startup. Upgrade to Flutter 3.35.0 or later for iOS 26, 3.32.0 for iOS 18.4. There is no entitlement that fixes it.

MCP Server Design for a Large Internal API Surface

Mapping 200 internal REST endpoints to 200 MCP tools puts 200 KB of JSON schema in front of every request. The 2026-07-28 spec also made the usual escape hatch illegal: tools/list MUST NOT vary per-connection, so per-session dynamic registration is gone. Here are the three levers that still work, with measured wire sizes and verified code on @modelcontextprotocol/server 2.0.0.

Microsoft.Extensions.AI 10.9 Ships Routing and Failover Chat Clients

Microsoft.Extensions.AI 10.9.0 adds RoutingChatClient, OrderedFailoverChatClient, and SemanticRoutingChatClient. Verified against the real package: what fails over, what does not, and why MEAI001 breaks your build.

Blazor Server Circuits Now Pause Themselves When the Tab Goes Idle

.NET 11 Preview 7 adds an opt-in package that pauses interactive Server circuits when the browser tab is hidden, freeing memory and SignalR connections held by users who are not actually there.

Fix: 404 Not Found for blazor.server.js after installing a new .NET SDK

blazor.server.js 404s on .NET 10 because the script stopped being an embedded resource. Add RequiresAspNetWebAssets to the host project, or make sure it has a .razor file.

Fix: MSB4057 The target "ResolvePackageAssets" does not exist in the project in .NET MAUI

MSB4057 means a target ran against the outer cross-targeting build of a multi-targeted MAUI project. Pass a TFM, or guard the target with a TargetFramework condition.

Fix: Visual Studio Test Explorer hangs on an xUnit v3 project while dotnet test passes

Test Explorer drives xUnit v3 through Microsoft.Testing.Platform server mode over a JSON-RPC socket, dotnet test does not. Set UseMicrosoftTestingPlatformRunner so both paths are the same code, or set DisableTestingPlatformServerCapability to fall back to VSTest.

Migrate a Claude Code Setup to Manual Permission Mode Without Breaking Headless Runs

Tightening a team's default permission mode to Manual is a one-line settings change interactively and a silent outage in CI, because headless runs turn every ask into a deny and still report success. Measured on Claude Code 2.1.224, including the trust gate that drops your allowlist but keeps your mode.

C# 15 Gets Labeled break and continue in .NET 11 Preview 7

Labeled break and continue landed in the C# section of .NET 11 Preview 7. You can now put a label on a loop and jump straight to it, which retires the bool flag and goto workarounds for nested loops.

Fix: dotnet tool install --global dotnet-ef throws an error

Every way dotnet tool install --global dotnet-ef fails on the .NET 10 SDK, with the exact message and exit code for each: already installed, version not found, downgrade blocked, shim conflict, dead NuGet feed, and the runtime mismatch that only breaks after the install succeeds.

Fix: The 'interceptors' feature is not enabled in this namespace

CS9137 comes from the Microsoft.AspNetCore.OpenApi source generator. Add InterceptorsNamespaces to every project that calls AddOpenApi, not just the one holding the PackageReference.

Migrate an Agent from Chunking-and-RAG to a 1M-Token Context Window

The 1M-token context window is now the default on Claude Opus 5, Opus 4.8/4.7/4.6, Sonnet 5, and Sonnet 4.6, with no beta header and no long-context premium. Here is when deleting the vector store actually pays off, the 10x cache-read rule that decides it, the ~30% tokenizer inflation that breaks your sizing estimate, and the seven-step migration with a verification line on each one.

Claude Code Cloud Sessions Can Now Run on Your Own Hosts

Claude Code 2.1.224 adds claude self-hosted-runner, a public beta that executes cloud sessions on machines you provision. Here is the setup, the one-user runner rule, and what still leaves your network.

Fix: The type or namespace name 'OpenApiReference' could not be found

OpenApiReference was deleted in Microsoft.OpenApi 2.0. Changing the using to Microsoft.OpenApi is not enough: replace each usage with a typed reference such as OpenApiSchemaReference.

How to replace Flutter's deprecated Radio groupValue and onChanged with RadioGroup

Radio.groupValue and Radio.onChanged were deprecated after Flutter 3.32 and RadioGroup shipped in 3.35. A step-by-step migration for Radio, RadioListTile and CupertinoRadio, why dart fix cannot do it for you, and the generic type-inference trap that silently renders a migrated radio disabled. Verified on Flutter 3.44.2 stable.

How to show a modal window in .NET MAUI 11

Two different things get called a modal window in .NET MAUI 11. PushModalAsync gives you a modal page on every platform. A real OS window that disables its owner has no MAUI API at all, so here is the WinUI OverlappedPresenter.IsModal plus Win32 owner-handle interop that actually works on Windows, and what to do on Mac Catalyst instead.

Migrate Off the Archived MCP Reference Servers (GitHub, Postgres, Slack)

The GitHub, Postgres, and Slack MCP servers from modelcontextprotocol/servers were archived in 2025 and their npm packages are deprecated. They pin SDK 1.0.1, which cannot negotiate past protocol 2024-11-05. Here is the audit script, the current replacement for each, and the two pointers in the archive README that are themselves stale.

Claude Code 2.1.224 Lets One Session Message Another

Cross-session messaging landed on August 7, 2026. ListAgents and SendMessage move plain text between your sessions, and crossSessionInbound decides what actually arrives.

How to call a stored procedure and map its results in EF Core 11

Use FromSql on a DbSet when the procedure returns full entity rows, Database.SqlQuery when it returns a projection, and ExecuteSql when it returns nothing. Never chain a LINQ operator onto an EXEC, and never read an output parameter before the reader is disposed.

How to customize source-generated System.Text.Json serialization with a type-info resolver modifier

Attach a JsonTypeInfo modifier to a source-generated JsonSerializerContext in .NET 11: why new MyContext(options) silently drops it, the WithAddedModifier setup that works, the fast path you give up (measured), and the naming-policy trap that makes modifiers no-op.

How to override the default resilience handler that Aspire registers

Aspire's AddServiceDefaults applies a standard resilience handler to every HttpClient. Calling AddStandardResilienceHandler again stacks a second one instead of replacing it. Here are the three real override paths, the -standard options name nobody documents, and the infinite timeout you inherit if you just remove it.

Migrate Cursor Rules to Skills, Subagents, and Plugins (Cursor 3.11)

Cursor did not delete rules. It split them. This checklist sorts a .cursorrules file and a folder of .mdc rules into the four things they should be in Cursor 3.11: an AGENTS.md, a small set of surviving rules, skills, and subagents, then bundles the result as a plugin.

Copilot MCP Allowlists Land in Enterprise Managed Settings

GitHub's August 6, 2026 changelog adds allowedMcpServers and deniedMcpServers to copilot/managed-settings.json. URL and argv matchers, deny-wins precedence, and a fail-closed default the older name-based registry never had.

How to rename a table in an EF Core 11 migration without losing data

EF Core scaffolds RenameTable when you change the table name, but DropTable plus CreateTable when you rename the entity class. Here is how to tell the two apart, the ToTable trick that makes a class rename free, and the column-rename bug that silently swaps your data.

How to run a file-based C# app with `dotnet run app.cs` in .NET 11

A complete guide to file-based C# apps: running a single .cs file with dotnet run, the #:package, #:sdk, #:property, #:project and #:include directives, multi-file scripts with #:ref, argument and stdin handling, the build cache, native AOT publishing, packaging as a dotnet tool, and dotnet project convert when the script outgrows itself.

How to serve OpenAPI documentation with Scalar instead of Swagger UI in ASP.NET Core 11

Replace UseSwaggerUI with MapScalarApiReference in ASP.NET Core 11: routing, multiple documents, pre-filled auth, production gating, offline assets, and the Scalar-only OpenAPI extensions that mark endpoints stable or hidden.

Migrate a Custom TypeScript Agent Loop to the Cursor SDK (@cursor/sdk 1.0.26)

A step-by-step checklist for retiring a hand-rolled while-loop agent and running the same job on @cursor/sdk 1.0.26. The tool bodies survive, the loop does not, and three things you probably rely on have no equivalent: a system prompt string, a tool allowlist, and per-turn control.

Aspire vs Docker Compose for local multi-service development

Aspire 13.4.6 wins the .NET inner loop because it runs your projects as host processes you can debug, while Docker Compose wins when the compose file is also your CI and deployment contract. Measured startup and edit-to-running timings on both, the configuration each one injects for you, and the six gotchas that decide it.

Microsoft.Testing.Platform 2.3: --report-gh Puts Test Failures on the PR Diff

The .NET blog's August 6, 2026 post on MTP reporting surfaces a batch of extensions that went stable in Microsoft.Testing.Platform 2.3.0: GitHub Actions annotations, crash-resilient TRX streaming, and Azure DevOps flaky history.

Migrate a Custom Multi-Agent Orchestrator to Handoff Orchestration in Agent Framework 1.17

Replace a hand-rolled classifier-plus-switch router with AgentWorkflowBuilder.CreateHandoffBuilderWith in Microsoft.Agents.AI.Workflows 1.17.0. What breaks, the six migration steps, and the gotchas around agent Ids, descriptions, and context broadcast.

xUnit v3 vs NUnit vs MSTest in 2026: which should you pick?

Pick xUnit v3 for greenfield .NET projects, NUnit 4.6 if you live in its constraint model, MSTest 4 if you already ship it. A measured comparison on .NET SDK 10.0.201 covering parallelism defaults, test class lifecycle, assertion failure output, and the Microsoft.Testing.Platform version conflict that breaks the NUnit runner.

WebApplicationFactory vs Testcontainers for ASP.NET Core integration tests

They are not alternatives. WebApplicationFactory boots your app, Testcontainers boots your dependencies. Measured on .NET SDK 10.0.201: a container fixture costs 1.7 s per class against 10 ms for SQLite, and a HasMaxLength(16) violation that Postgres rejects with 22001 is silently accepted by SQLite.

Copilot Automations Now Trigger on Issue and PR Comments

GitHub's August 3, 2026 changelog adds a comment trigger to Copilot cloud agent automations, replacing the issue_comment workflow plus PAT plus REST dispatch that teams have been hand-rolling since June.

Fix: Attempting to reconnect to the server after a Blazor Server circuit disconnects

The reconnect modal means the SignalR circuit dropped, not that your app crashed. Decide whether the retry ended in failed or rejected, then fix sticky sessions, the 3-minute retention window, the 32 KB message limit, or persist circuit state with [PersistentState].

Fix: flutter doctor reports cmdline-tools component is missing

Install the Android SDK Command-line Tools so the binaries land in /cmdline-tools/latest/bin, point ANDROID_HOME at the SDK root, then re-run flutter doctor.

gRPC vs REST vs SignalR for service-to-service calls in .NET 11

For internal service-to-service calls in .NET 11, default to gRPC when you own both ends of the contract and the call is point-to-point. Use REST with JSON when anything you do not control has to call the service. SignalR is not an RPC transport between services: reach for it only when one producer has to fan a message out to many long-lived consumers.

Subtask vs Fork vs Background Agent in Claude Code: Which Delegation to Reach For

A named subagent starts cold, a fork inherits your whole conversation and shares your prompt cache, and a background agent is a second Claude Code session entirely. The trap is the naming: /fork stopped being the in-session fork at v2.1.212 and /subtask took over.

Declarative YAML Workflows vs Code-First Orchestration in Microsoft Agent Framework

Use declarative YAML when the graph is a sequential routing decision that non-developers change often. Use code-first WorkflowBuilder the moment you need parallelism, custom executors, or a non-Foundry agent. Here is the decision, the action catalog limits, and the code both ways.

Fix: AggregateException "One or more errors occurred" when awaiting Task.WhenAll in C#

await Task.WhenAll rethrows only one of the failures. Keep the WhenAll task in a variable and read its Exception.InnerExceptions to see every error instead of one.