Morley.Dotnet.BugReport
0.1.1
dotnet tool install --global Morley.Dotnet.BugReport --version 0.1.1
dotnet new tool-manifest
dotnet tool install --local Morley.Dotnet.BugReport --version 0.1.1
#tool dotnet:?package=Morley.Dotnet.BugReport&version=0.1.1
nuke :add-package Morley.Dotnet.BugReport --version 0.1.1
dotnet-bugreport
A command-line tool that collects useful diagnostic information about your .NET project, environment, and system.
It generates a single Markdown file that can be pasted directly into GitHub issues or shared with maintainers.
dotnet-bugreport is designed to simplify debugging by automatically gathering:
- .NET runtime and SDK information (
dotnet --info) - Operating system and architecture details
- All
.csprojfiles in a directory (recursively) - Target framework versions from each project
- Package references and versions from each project
global.jsonsettings- Relevant environment variables (DOTNET_, ASPNETCORE_, MSBUILD_*)
- Git branch, commit, and remote URL
- Container detection (Docker/Kubernetes)
The tool outputs a structured bugreport-YYYYMMDD-HHMMSS.md file in the working directory.
Features
- Zero dependencies - Uses only built-in .NET APIs (no NuGet packages required)
- Unified diagnostic snapshot for .NET projects
- Recursively finds all
.csprojfiles in a directory - Automatically detects the current Git repository
- Produces clean Markdown suitable for GitHub Issues
- Zero configuration required
- Works cross-platform on Windows, macOS, and Linux
- Supports copying output directly to clipboard
Installation
Install globally via the .NET CLI:
dotnet tool install -g dotnet-bugreport
Usage
Run the tool from any directory containing .NET projects:
dotnet-bugreport
The tool will generate a bugreport-YYYYMMDD-HHMMSS.md file in the current directory containing all the diagnostic information.
Parameters
| Parameter | Short | Description |
|---|---|---|
--path <path> |
-p |
Specifies the directory to scan for .NET projects. If not provided, the current directory is used. |
--clipboard |
-c |
Copies the generated bug report directly to the system clipboard instead of writing to a file. Falls back to file output if clipboard access fails. |
Examples
Scan the current directory and write the report to a file:
dotnet-bugreport
Scan a specific directory:
dotnet-bugreport --path /path/to/project
Or using the short form:
dotnet-bugreport -p /path/to/project
Copy the report directly to clipboard:
dotnet-bugreport --clipboard
Or using the short form:
dotnet-bugreport -c
Combine options to scan a specific directory and copy to clipboard:
dotnet-bugreport -p /path/to/project -c
Output
The generated bug report includes the following sections:
- System Information - OS, architecture, and runtime details
- dotnet --info - Full output of the
dotnet --infocommand - global.json - Contents of the global.json file if present
- Project Files - List of all
.csprojfiles with their target frameworks and package references - Solution Files - List of solution files in the root directory
- Environment Variables - Relevant .NET, ASP.NET Core, and MSBuild environment variables
- Git Information - Current branch, commit hash, and remote URL
- Container Detection - Whether the tool is running inside a Docker/Kubernetes container
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.