explaingit

dzmprt/csharppainkiller

11TypeScriptAudience · developerComplexity · 3/5ActiveSetup · easy

TLDR

A VS Code extension that scaffolds C# types, fixes namespaces, generates ASP.NET, MediatR, and EF Core boilerplate, and surfaces inline diagnostics.

Mindmap

mindmap
  root((CSharpPainkiller))
    Inputs
      Folder context
      Existing classes
      Settings toggles
    Outputs
      New .cs files
      Refactored code
      Inline diagnostics
    Use Cases
      Scaffold C# types
      Fix namespaces
      Generate CRUD APIs
    Tech Stack
      TypeScript
      VS Code
      C#
      ASP.NET
      EF Core

Things people build with this

USE CASE 1

Scaffold a new C# class, record, or interface from the VS Code explorer

USE CASE 2

Adjust namespaces across a folder when reorganizing a C# project

USE CASE 3

Generate a CRUD ASP.NET controller wired to a DbContext

USE CASE 4

Extract an interface from a class or sort using directives in one click

Tech stack

TypeScriptVS CodeC#ASP.NETEF CoreMediatR

Getting it running

Difficulty · easy Time to first run · 5min

Just install from the VS Code marketplace; no extra config needed for the basic scaffolds.

In plain English

CSharp Painkiller is a Visual Studio Code extension aimed at people writing C# code. VS Code is a free code editor from Microsoft, and an extension adds extra menu items and shortcuts to it. This particular extension tries to reduce the small repetitive tasks that come up when working on C# projects, so the name is a nod to taking away pain. The main feature is creating new C# type files. You right-click a folder in the explorer and pick C# Create, and it scaffolds a class, record, struct, enum, interface, or record struct with the correct namespace already filled in. Related to that, there is an Adjust Namespaces action that fixes namespace declarations across one file or a whole folder, and a Rename File By Type action that renames a .cs file so its name matches the type inside it. The refactor menu also includes a one-click Extract Interface from a class, a Generate Mapping Methods option that writes MapTo and MapFrom boilerplate between two types, and a Sort Usings action that alphabetises the using directives at the top of files. For people building web APIs, there are generator templates for ASP.NET controllers and Minimal API endpoints, including full CRUD versions wired to a DbContext. There are also templates for MediatR and MitMediator (libraries for the request and handler pattern), covering requests, handlers, notifications, and pipeline behaviors. Entity Framework Core entity configurations can be scaffolded too. Finally, the extension shows real-time inline diagnostics for things like a wrong namespace, a filename that does not match the primary type, unsorted using directives, and mixed-script identifier names. Each one can be turned on or off in settings.

Copy-paste prompts

Prompt 1
Show me how to install CSharpPainkiller in VS Code and trigger the C# Create menu
Prompt 2
Walk me through generating a Minimal API CRUD endpoint backed by EF Core
Prompt 3
Help me configure which inline diagnostics this extension shows
Prompt 4
Explain the MediatR and MitMediator templates and when to use each
Prompt 5
Generate a MapTo and MapFrom pair between two existing C# records
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.