csharp-dotnet

Develops and reviews C# and .NET applications across ASP.NET Core, Blazor, MAUI, and EF Core.

22|Updated Sep 10, 2026
One-click install
npx skills add https://github.com/Lynricsy/HyperSkills --skill csharp-dotnet-lynricsy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-dotnet
Source: https://github.com/Lynricsy/HyperSkills/tree/main/skills/csharp-dotnet
Command: npx skills add https://github.com/Lynricsy/HyperSkills --skill csharp-dotnet-lynricsy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Modern .NET work spans the C# language, MSBuild and NuGet configuration, ASP.NET Core services, Blazor render modes, testing, diagnostics, and framework upgrades, and each area has silent failure modes (captive scoped dependencies, NU1008 under Central Package Management, deadlocks from blocking on async) that generic advice misses. This Skill encodes the adjudicated rules and workflows so an agent produces correct .NET code and diagnoses real defects instead of plausible-looking ones. ## Core Features & Use Cases - Opinionated core rules: 25 ordered rules covering MSBuild evaluation order, CPM version management, nullable reference types, DI lifetimes, async pitfalls, HttpClient usage, and minimal API shape. - Task workflows: Step-by-step checklists with explicit gates for adding a feature, fixing a build, reviewing a diff, diagnosing a runtime issue with dotnet-counters/trace/dump, adding tests, and upgrading target frameworks. - Deep references: Topic-routed reference files for the C# language, async and concurrency, MSBuild/NuGet, ASP.NET Core, Blazor, MAUI, testing, diagnostics, and upgrades. - Use Case: A review of a pull request flags a singleton capturing a scoped DbContext, a .Result blocking call, and a PackageReference carrying a version under CPM, each with file, line, reasoning, and a concrete fix. ## Quick Start Ask the agent to review the diff of your ASP.NET Core service for DI lifetime, async, and build-file issues using the csharp-dotnet skill.

Frequently Asked Questions about csharp-dotnet

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix NU1008 when using Central Package Management?

NU1008 means a PackageReference carries a Version attribute while ManagePackageVersionsCentrally is enabled. Move the version into Directory.Packages.props as a PackageVersion item, and use VersionOverride only for the one project that genuinely needs a different version.

Why does my ASP.NET Core app throw 'A second operation was started on this context instance'?

A DbContext is scoped and not thread-safe, so this error means one instance is being used concurrently, typically because a singleton captured it. Inject IDbContextFactory<T> or IServiceScopeFactory and create a context per unit of work instead.

Should I use minimal APIs or controllers in ASP.NET Core?

Match whichever style the project already uses and never mix both in one project. For a new project, default to minimal APIs with MapGroup, TypedResults, and explicit Results unions; choose controllers when you need attribute-based filters or an existing MVC surface.

Does ConfigureAwait(false) prevent deadlocks in ASP.NET Core?

No. ASP.NET Core has no synchronization context, so ConfigureAwait(false) changes nothing there. It belongs in library code that might run under a UI or legacy ASP.NET context; the actual defect in ASP.NET Core is blocking on async with .Result or .Wait().

Why does my Blazor component fetch data twice on page load?

Prerendering is on by default for interactive render modes, so OnInitializedAsync runs once during prerender and again when interactivity attaches. Persist the state with the [PersistentState] attribute and fetch only when the property was not restored.

How do I diagnose a .NET application that hangs under load?

Start with dotnet-counters monitor: a rising thread-pool queue length with low CPU indicates blocking on async calls. Then capture a dump with dotnet-dump collect and inspect clrstack -all for threads stuck in Task.Wait or GetResult frames.