Menu

Post image 1
Post image 2
1 / 2
0

CLAUDE.md for C# and .NET: 13 Rules That Make AI Write Modern, Idiomatic Production Code

DEV Community·Olivia Craft·23 days ago
#fO6sBMNp
#csharp#dotnet#claudemd#ai#fullscreen#async
Reading 0:00
15s threshold

Ask Claude Code to "add an endpoint that returns paged orders for a customer" and the output compiles. It also ignores nullable warnings, hides an async void , blocks the thread pool with .Result , wraps everything in try/catch (Exception) , reaches for a static DbContext , and sprinkles IConfiguration["..."] strings like glitter. It runs fine on your laptop. It deadlocks in staging. C# in 2026 is not the C# the model was trained on. NRTs, records, pattern matching, minimal APIs, file-scoped namespaces, and IAsyncEnumerable are table stakes. Half the model's training is .NET Framework era; half the rest is "Hello World" tutorials. A CLAUDE.md next to your .csproj is the cheapest way to drag it forward. Get the full CLAUDE.md Rules Pack — oliviacraftlat.gumroad.com/l/skdgt . The 13 rules below are a free preview. 1. Nullable reference types on, warnings as errors <Nullable>enable</Nullable> and <TreatWarningsAsErrors>true</TreatWarningsAsErrors> go in every .csproj for new code.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More