Urgent.News

What's breaking now, across thousands of outlets.

Tech

This week in Cursor + .NET — 7 rules (week ending August 30, 2026)

Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on the Agentic Architect blog . 7 daily senior rules Rule 9: Scoped Capture in Singleton Sun 30 Aug The single most expensive .NET runtime bug: a Singleton holding a Scoped service. Cursor cheerfully writes this without warning. Audit constructor parameters…

This week in Cursor + .NET, there are seven rules for senior C#/.NET engineers to follow. The first rule, Rule 9, warns about the risk of a Singleton holding a Scoped service, which can lead to a single most expensive .NET runtime bug. The second rule, Rule 8, emphasizes propagating CancellationToken in every async method to prevent the AI from losing cancellation half-way down a call chain.

Rule 7 advises against using HttpClient() in generated code, instead forcing the use of IHttpClientFactory or a typed client to avoid socket-exhaustion bugs. Rule 6 suggests never hardcoding DateTime.Now or DateTime.UtcNow in business logic, instead injecting TimeProvider (or your own IClock) to make time deterministic for tests.

Rule 5 encourages using MapGroup and EndPoints for .NET 9 services to keep the context window lean and focused. Rule 4 mandates adding FluentValidation rules to every MediatR Request to prevent context rot. Rule 3 requires enforcing ILogger with structured templates for better log debugging.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

New Apple Watch Series 12 and Apple Watch Ultra 4 Features Revealed

Bloomberg 's Mark Gurman today further outlined what to expect from the Apple Watch Series 12 and Apple Watch Ultra 4 set to be unveiled on September 9 . While it was initially rumored that Touch ID may be coming to the Apple Watch this year, Gurman reiterated that he does not expect the Series 12 or Ultra 4 to have any major design…

More from Sunday 30 August →