Black Friday40% OFFeverything + AI community $119/year · code BF26 · until Dec 1See all deals
🔥 Black Friday: everything 40% off with code BF26 · $89.99 instead of $149.99 until Dec 1 · 9/12 modules live9/12
By Stefan Đokić · Microsoft MVP

Pragmatic .NET Code Rules · Guardrails for AI-Written Code

AI writes the code. Your build decides what ships.

The exact .editorconfig, analyzers, architecture tests and CI quality gates I use in production. Deterministic checks that review every line - whether a teammate, Claude Code or Copilot wrote it. Copy, apply, ship.

9 of 12 modules live · 60+ lessons ready to watch75%

Black Friday: $89.99 (was $149.99) with code BF26, applied at checkout, until Dec 1. New modules unlock for you the day they're released.

Instant access 14-day money-back guarantee lifetime access + every new module

5.0 from 4 reviews
Stefan Đokić holding the Pragmatic .NET Code Rules course
Microsoft MVP21,000+ newsletter readers110k+ LinkedIn9/12 modules live · 80+ lessons★★★★★
Recommended by a Microsoft MVP★★★★★
"This is the most in-depth course on .NET quality that I have ever seen. Stefan explains, really in depth, how .editorconfig, props files and static code analysis work and how to set them up from scratch. I highly recommend it - it will increase your code quality, cut review time, and reduce bugs."
Anton Martyniuk
Anton Martyniuk
Microsoft MVP · .NET Software Architect
The new bottleneck

AI made writing code cheap. Reviewing it didn't get any cheaper.

  • ✕ PRs are bigger than ever - and nobody reads every line anymore
  • ✕ The agent "fixes" the build with #pragma warning disable or null!
  • ✕ An endpoint quietly skips the Application layer - it compiles, so it ships
  • ✕ Logs full of string interpolation and customer emails
  • ✕ CLAUDE.md says one thing, the code does another
  • ✕ And still: "please format this" on every single PR

You don't need more review time.
You need a build that reviews every line - for humans and agents.

Code inconsistency across a .NET team
Why this matters more with AI

CLAUDE.md is a suggestion. The build is a rule.

Instruction files tell an AI agent what you want. Only deterministic checks make sure it actually happened. This course builds both - and wires them together.

📝

Tell it

A CLAUDE.md (or AGENTS.md / copilot-instructions) with your real rules, built up module by module and ready to copy.

🧱

Check it

Analyzers, warnings as errors, architecture tests and logging rules fail the build - with messages an agent can actually act on.

🚦

Gate it

CI and branch rules run the same checks on every pull request. An agent can't skip them, silence them or merge around them.

1.7×
more issues per pull request when AI co-authors the code
3×
more readability issues - naming, clarity and structure
2.66×
more formatting problems - spacing, indentation, style drift

Source: CodeRabbit, State of AI vs Human Code Generation (Dec 2025, 470 open-source PRs). Exactly the kind of issues this course turns into build errors.

The transformation

What changes after you apply this

Before

  • ✕ PRs full of "fix formatting" comments
  • ✕ Every developer - and every AI agent - follows different rules
  • ✕ CI passes dirty code all the time
  • ✕ Agents silence warnings to get a green build
  • ✕ Architecture erodes one "harmless" shortcut at a time
  • ✕ "Tabs vs spaces" debates in Slack

After

  • ✔ PRs focus on logic, architecture, and real issues
  • ✔ Every file follows the same rules - no matter who (or what) wrote it
  • ✔ CI rejects non-compliant code before a human sees it
  • ✔ A new suppression needs a human's explicit approval
  • ✔ Architecture tests catch the shortcut on the first run
  • ✔ The codebase looks like one person wrote it
The system

What you'll learn

Production-tested techniques across 12 modules and 80+ lessons, including AI Bonus lessons for Claude Code and GitHub Copilot.

01

The Code Consistency Mindset

Why unified code isn't "nice to have" - it's a force multiplier for velocity and maintainability.

  • → See how inconsistent code silently kills delivery speed
  • → The mindset top engineering teams use to stay aligned
  • 🤖 With AI: rules that live in the repo, not in a wiki, are the only ones every agent runs into
The code consistency mindset
02

.editorconfig Deep Dive

Master the most underrated tool in .NET and make every IDE follow the same rules automatically.

  • → Build rock-solid formatting, naming & analyzer rules
  • → Structure it for small projects and massive solutions
  • 🤖 With AI: agents never read .editorconfig - the build enforces it on their code anyway
.editorconfig deep dive
03

Visual Studio Cleanup Automation

Turn Visual Studio into a self-cleaning machine that formats code before you even think about it.

  • → Create Cleanup Profiles that fix styling instantly
  • → Remove 90% of manual cleanup from your workflow
  • 🤖 With AI: hand the boring cleanup to an agent - tools find, AI fixes, the build verifies
Visual Studio cleanup automation
04

Analyzers & Warnings-As-Errors

Catch quality issues at the source instead of wasting reviewer time on low-value comments.

  • → Configure analyzers that actually matter
  • → Enforce rules without drowning devs in noise
  • 🤖 With AI: stop agents from "fixing" the build with #pragma, null! or <NoWarn>
Analyzers and warnings as errors
05

dotnet format + CI Enforcement

Build a CI pipeline that refuses messy code and guarantees consistency across your org.

  • → Add dotnet format to local and CI workflows
  • → Fail PRs automatically when rules are violated
  • 🤖 With AI: the same required checks for AI pull requests - no skipping, silencing or merging around them
dotnet format and CI enforcement
06

Team-Wide Adoption Strategies

Roll out code rules across your team smoothly, confidently, and without the usual resistance.

  • → Introduce new rules gradually and strategically
  • → Build a culture where clean code is the default
  • 🤖 With AI: a CLAUDE.md in the repo, so every teammate's agent follows the same rules
Team-wide adoption strategies
07

AI Guardrails

Make Claude Code and Copilot work inside your rules, not around them.

  • → A CLAUDE.md that grows module by module - cleanup, architecture, PRs, logging
  • → Hooks, analyzers and CI gates that catch what agents try to sneak in
Included with your purchase

Join now and get $107 in bonuses, free.

🎁

Starter Kit

A pre-configured .NET solution with .editorconfig, Directory.Build.props, analyzer setup, and CI pipeline - clone and use.

Value $49
🎁

CI Quality Gate Template

A GitHub Actions workflow that runs dotnet format, analyzers, and architecture tests - fails the PR if anything is off.

Value $29
🎁

Bonus Video: Automating PR Cleanup

A walkthrough on AI-assisted dependency updates and automated PR review with Dependabot + GitHub Actions.

Value $29

Bonuses total $107 · Yours free with the course

The full package

Everything you get

📹

The Course

  • ✔ 9/12 modules live, 60+ lessons today
  • ✔ AI Bonus lessons: Claude Code & Copilot
  • ✔ Lifetime access + all updates
  • ✔ Hosted on Skool - watch anywhere
📦

Ready-to-Use Files

  • ✔ Production-ready .editorconfig
  • ✔ Directory.Build.props best practices
  • ✔ GitHub Actions CI configs
  • ✔ CLAUDE.md with every rule from the course
👥

Community Access

  • ✔ Private Skool community (free)
  • ✔ Q&A with the instructor
  • ✔ Share setups, get feedback
  • ✔ Connect with other .NET devs
📋

Clean Commit Checklist

  • ✔ Step-by-step checklist (PDF)
  • ✔ Printable - pin by your monitor
  • ✔ Share with your team
  • ✔ Use it as your PR quality gate
Proof

What developers are saying

Specific feedback from engineers who already had opinions about code quality before they bought this.

5.0 average from 4 reviews
I have been working with static weather analysis for many years. .editorconfig, props files and static code analysis packages are my daily tools. Stefan explains, really in depth, how these things work and how you can set them up from scratch. This is the most in-depth course on .NET quality that I have ever seen. I can highly recommend this course for .NET developers, as it will increase your code quality, cut your code review time, and reduce the number of bugs. A trick for adding a pre-commit hook in Git is something I learnt myself from this course., When watching this course, pause and set up the exact configuration for your projects. The best way to learn is by practicing of what you have just watched.
Anton Martyniuk
I really enjoyed the chapters on EditorConfig and automating code cleanup. From my experience, code style inconsistencies often become a problem in team projects, but this course provides a clear and practical way to solve that. The step-by-step explanation of creating and configuring the .editorconfig file made the concept easy to understand. I also found the sections on Visual Studio cleanup profiles and Git pre-commit hooks especially useful because they show how to automate formatting and maintain standards without relying on manual checks., My tip for new students would be to follow the course hands-on instead of just watching the videos. Try implementing the .editorconfig, code cleanup profiles, and Git hooks in your own project while learning.
kanaiya Katarmal
Great course, for every user, even if you are starting to code. You can get a clear view of code rules. Practice with simple codes to check the desire results., Great course, for every user, even if you are starting to code. You can get a clear view of code rules. Practice with simple codes to check the desire results.
Oso
Stefan Đokić, Microsoft MVP
Microsoft MVP

This isn't theory - it's how I ship production code.

Hi, I'm Stefan Đokić - Microsoft MVP, Senior Software Engineer, and creator of TheCodeMan.net.

For more than 10 years I've been building large-scale .NET solutions where consistency, clarity, and automation aren't optional - they're the only way teams ship fast and reliably.

Everything in this course comes from real production experience. These are the exact files and configs I use every day - not theory, not "ideal world" scenarios.

0+
Newsletter
0k+
LinkedIn
0+
Twitter / X
Black Friday · code BF26 · until Dec 1

Get it now, before the price goes to $149.99.

40% OFF

Pragmatic .NET Code Rules

Instant access to 9/12 modules + every new module as it's released

$89.99$149.99

Save $60 with code BF26 (applied at checkout) · $149.99 after Dec 1

  • ✔ Instant access: 9/12 modules, 60+ lessons today
  • ✔ Remaining modules added free as they're released
  • ✔ AI Bonus lessons: Claude Code & Copilot inside your rules
  • ✔ Production-ready config files
  • ✔ CI quality gate template + Starter Kit
  • ✔ Clean Commit Checklist (PDF)
  • ✔ Bonus: AI-assisted PR review video
  • ✔ Community access (free, lifetime)
  • ✔ Lifetime access + all future updates
Get Instant Access →

14-day money-back guarantee · Secure checkout via Lemon Squeezy

Why buy now?

🔓
Instant access
Start today with 9 modules and 60+ lessons. No waiting for a launch date.
⏰
Lowest price it will ever be
$89.99 instead of $149.99 with code BF26. The price goes back to $149.99 after Dec 1.
🤖
AI Bonus lessons
Claude Code and Copilot working inside your rules, not around them.
🔄
Zero risk
14-day money-back guarantee. Not for you? Get a full refund.
Honest fit check

Is this course right for you?

Not for developers who…

  • ✕ Prefer manual cleanup
  • ✕ Believe "style doesn't matter"
  • ✕ Don't want automation in their workflow
  • ✕ Want AI to ship code with no checks at all

Built for developers who…

  • ✔ Work in .NET teams of any size
  • ✔ Want predictable, standardized code
  • ✔ Are tired of PRs full of style corrections
  • ✔ Want CI/CD to enforce consistency
  • ✔ Care about maintainability and professionalism
  • ✔ Use Claude Code, Copilot or Cursor and want to trust what lands in main
The full curriculum

12 modules. 80+ lessons. 9 live now.

Click any module to expand. Live modules are ready to watch today, Coming soon ones unlock for you as they're released. 🤖 AI Bonus lessons show Claude Code and Copilot working inside your rules, and Free preview lessons are open before you buy.

🧱 00 · Course IntroductionLive5 lessons+
00.01 Welcome
00.02 What You Will Learn
00.03 Who This Course Is For
00.04 Tools & Requirements
00.05 How to follow the course
🗂️ 01 · The Foundation: EditorConfigLive8 lessons+
01.00 Module Intro
01.01 Why Code Style Consistency Matters
01.02 Creating the CleanStart Solution Structure
01.03 What EditorConfig Is & How It Works
01.04 Adding the .editorconfig File
01.05 Running Code Cleanup to Apply Rules
01.06 EditorConfig Tips, Tricks & Best Practices
01.07 Chapter Recap
🧹 02 · Automating Code CleanupLive6 lessons+
02.00 Module Intro
02.01 Visual Studio Code Cleanup Profiles
02.02 Running Cleanup Automatically on Save
02.03 One-Click Full Solution Cleanup
02.04 Git Pre-Commit Hooks for Formatting
02.05 Chapter Recap
🚨 03 · Diagnostics & Warnings as ErrorsLive5 lessons+
03.01 Understanding Diagnostic Severities
03.02 Organizing Rules: Suggestion, Warning, Error
03.03 Enforcing Warnings as Errors in .NET Projects
03.04 How This Prevents Future Bugs
03.05 Chapter Recap
🔍 04 · Static Analysis in .NETLive6 lessons+
04.01 Introduction to .NET Analyzers
04.02 Adding StyleCop to the Project
04.03 Adding SonarAnalyzer for Deeper Analysis
04.04 Configuring Analyzer Rules in EditorConfig
04.05 Identifying Real-World Issues with Static Analysis
04.06 Chapter Recap
🏗️ 05 · Centralized Settings: Directory.Build.propsLive6 lessons+
05.01 Why Centralized Build Settings Matter
05.02 Creating Directory.Build.props
05.03 Adding Global Usings, LangVersion & Nullable
05.04 Unifying All Projects with Shared Rules
05.B Central Package ManagementBonus
05.05 Chapter Recap
⚙️ 06 · Visual Studio Productivity & Clean CodeLive5 lessons+
06.01 Essential VS Formatting Features
06.02 File Header Templates
06.03 Custom Snippets for Faster Development
06.04 Format on Save, Run Cleanup on Build
06.05 Chapter Recap
🧹 07 · Project Cleanup & ConsistencyLive7 lessons+
07.00 Module Intro
07.01 Standard Project Folder Structure
07.02 Enabling Nullable & Analyzing Warnings
07.03 Removing Unused Files, Refs & Dependencies
07.04 Normalizing Namespaces & Usings
07.05 Tools Find, AI Fixes, the Build Verifies🤖 AI Bonus
07.06 Chapter Recap
🧱 08 · Architecture TestsLive7 lessons+
08.00 Module Intro
08.01 Why Architecture Tests Matter
08.02 Adding NetArchTest
08.03 Testing Domain → Application → Infrastructure
08.04 Preventing Cycles & Wrong References
08.05 Architecture Tests as Guardrails for Agents🤖 AI Bonus
08.06 Chapter Recap
🔄 09 · Integrating Code Quality into CI/CDLive7 lessons+
09.00 Module Intro
09.01 dotnet format in CI
09.02 Running Analyzers in CI
09.03 Enforcing Warnings as Errors in the Pipeline
09.04 Preventing "Dirty Code" from Entering Main
09.05 Same Gates for Human and AI Pull Requests🤖 AI Bonus
09.06 Chapter Recap
🧭 10 · Logging & ObservabilityComing soon8 lessons+
10.00 Module Intro
10.01 Adding Serilog to the Project
10.02 Structured Logging Best Practices
10.03 Keeping Sensitive Data Out of Logs
10.04 Adding OpenTelemetry (OTEL) Basics
10.05 Tracing Requests in an API
10.06 AI Writes Bad Logs - and Reads Your Traces🤖 AI Bonus
10.07 Chapter Recap
🧰 11 · The AI-Ready TemplateComing soon7 lessons+
11.00 Module Intro
11.01 Turning the CleanStart Solution Into a Template
11.02 Exporting as a dotnet new Template
11.03 Exporting as a Visual Studio Template
11.04 Making the Template AI-Ready: CLAUDE.md, AGENTS.md & .mcp.json🤖 AI Bonus
11.05 Sharing the Template with Your Team
11.06 Chapter Recap
🤖 12 · AI GuardrailsComing soon9 lessons+
12.00 Module Intro
12.01 Why AI Needs Guardrails, Not Trust
12.02 Hooks: Format, Build & Test After Every Agent Edit
12.03 Banning the Patterns AI Loves
12.04 Dependabot + NuGetAudit: Safe Dependency Updates
12.05 AI PR Review with GitHub Actions
12.06 What AI May Decide - and What It Must Not
12.07 Capstone: An Agent Builds a Feature, the Gates Catch Everything
12.08 Course Wrap-Up
Questions

Frequently asked questions

What platform is the course hosted on?+

The course is hosted on Skool, a modern platform that combines video lessons, community, and discussions in one place.

Is there a community included?+

Yes. You get access to a private Skool community where we discuss code rules, share setups, and ask questions. Community access is completely free and included.

Who is this course for?+

.NET developers who want clean, consistent, automated code. Great for individual developers, teams maintaining long-lived projects, and tech leads running code-quality initiatives.

What knowledge level do I need?+

You should be comfortable with C# and basic .NET projects. The content is practical for beginner+ and intermediate developers, and still very useful for seniors and team leads who want a system to roll out.

Can I use this with .NET 6/7/8/9/10?+

Yes. EditorConfig, analyzers, and dotnet format are part of the .NET SDK - not tied to a specific version. The course itself is recorded on .NET 10, and everything is forward-compatible.

Do I get lifetime access?+

Yes. Lifetime access to all lessons and every future update. No subscription, no renewal.

Does this help with AI-generated code (Claude Code, Copilot, Cursor)?+

Yes - that's where it matters most. CLAUDE.md tells an agent what you want, but only the build, analyzers, architecture tests and CI gates make sure it happened. From Module 07 on, every module ends with an AI Bonus lesson, and Module 12 ends with a capstone where an agent builds a feature and the gates catch every shortcut.

Is the course finished?+

9 of 12 modules are live (60+ lessons), and you get instant access to all of them. The remaining modules are released as they're finished, and they unlock for you automatically.

Will the price increase later?+

Yes. Until Dec 1 the course is $89.99 instead of $149.99 with code BF26, applied at checkout. After that it is $149.99. Buy now and you keep every future module and update at no extra cost.

Is there a refund policy?+

Yes. There's a 14-day money-back guarantee. If you feel it's not for you, reach out within 14 days of purchase and you get a full refund.

What if I already have an .editorconfig?+

Even better. The course shows you how to audit, improve, and enforce your existing setup - turning a basic config into a complete automated system.

Stop arguing. Start enforcing.

Your codebase, clean - no matter who (or what) writes the code.

Get Instant Access - $89.99 $149.99 →

9/12 modules live · 40% off with code BF26 until Dec 1 · 14-day money-back · Lifetime access

Pragmatic .NET Code Rules9/12 modules live · code BF26 until Dec 1
$89.99$149.99Get Access