Diagnosing issues in .NET projects can get messy fast. Between checking runtime versions, scanning project files, digging through environment variables, and figuring out what your Git state even is, it’s all too easy to miss something important.
dotnet-bugreport is a lightweight command-line tool designed to make that process painless. It gathers all the useful diagnostic information about your .NET environment and project in one go, packaging it neatly into a Markdown file you can paste directly into GitHub issues.
What It Does
dotnet-bugreport automatically collects:
- .NET SDK and runtime info (
dotnet --info) - Operating system and architecture details
- All
.csprojfiles in a directory (recursively) - Target framework versions per project
- Package references and versions
global.jsonconfiguration- Relevant environment variables (
DOTNET_,ASPNETCORE_,MSBUILD_) - Git branch, commit, and remote URL
- Container environment detection (Docker/Kubernetes)
The result is a single file named bugreport-YYYYMMDD-HHMMSS.md, placed in the working directory.
Features at a Glance
- No external dependencies (built entirely on the core .NET APIs)
- Unified, structured diagnostic snapshot
- Recursively discovers project files
- Detects Git repositories automatically
- Clean Markdown output suitable for GitHub Issues
- Cross-platform: Windows, macOS, Linux
- Supports copying directly to clipboard
- Zero configuration required
Installation
Install globally using the .NET CLI:
dotnet tool install -g dotnet-bugreport
Usage
Generate a bug report from any directory:
dotnet-bugreport
Specify a path:
dotnet-bugreport --path /path/to/project
Short version:
dotnet-bugreport -p /path/to/project
Copy the result straight to your clipboard:
dotnet-bugreport --clipboard
Combine options:
dotnet-bugreport -p /path/to/project -c
Output Contents
A generated report includes:
- System Information: OS, architecture, runtime details
- dotnet –info: Full command output
- global.json: If present
- Project Files: All
.csprojfiles with target frameworks and package references - Solution Files: Solutions found in the root directory
- Environment Variables: Relevant runtime and build variables
- Git Information: Branch, commit, remote URL
- Container Detection: Docker/Kubernetes awareness
License
This project is available under the MIT License.