r/csharp•
JohnAt2025

VSCode Extension : Automatically Detect Unused Code in Your .NET Projects

DotNet Prune is a VS Code extension that finds unused methods, fields, properties, and types using CSharp analyzers.

What It Does

  • Analyzes .NET solutions for unused code
  • Shows results in a hierarchical tree view (Solution → Project → File → Findings)
  • Click to navigate directly to the code
  • Right-click files to copy paths

Extension Usage

Quick Start

  • Install from VS Code Marketplace: "DotNetPrune"
  • Open your .NET workspace
  • Run "DotNetPrune: Run Analysis" from command palette
  • Browse findings in the Activity Bar panel

Why Use It?

  • Clean up your codebase easily
  • Integrated workflow - no external tools needed
  • Smart organization matching your solution structure

Marketplace: https://marketplace.visualstudio.com/items?itemName=nomad-in-code.dotnet-prune-vscode

Try it out and let me know what you think!

#dotnet #vscode #csharp #analyzer

Posted Nov 14, 2025, 7:04 PM UTC

104
Loading comments…