Skip to content

CsvDotNetPackageList is a .NET utility that scans a solution for NuGet package dependencies including transitive and exports them to a CSV file.

Notifications You must be signed in to change notification settings

SergerGood/CsvDotNetPackageList

Repository files navigation

About

CsvDotNetPackageList is a .NET utility designed to generate a CSV file containing a list of all NuGet packages referenced in a .NET solution including transitive dependencies. This tool is particularly useful who need to audit or document the dependencies used across their projects.

Features

  • Scans a .NET solution to identify all referenced NuGet packages.
  • Generates a CSV file listing each package's ID and version.
  • Supports analyzing multiple source files or solutions.
  • Includes progress reporting for visibility during execution.
  • Configurable execution via appsettings.json.
  • Simple and straightforward command-line interface.

Configuration

Configuration Options

  • Framework (optional): If not specified, the analysis will search for packages across all target frameworks.
  • WorkingDirectory (required for solution): The base directory used for resolving relative paths.
  • Sources (required): A list of project or solution files to analyze. For projects, you can specify the full path without specifying the WorkingDirectory option.

Example Configuration

To customize the behavior of the tool, you can modify the appsettings.json file as follows:

{
  "DotNetListSettings": {
    "Framework": "net8.0",
    "WorkingDirectory": "C:\\Projects\\MySolution",
    "Sources": [
      "MySolution.sln"
    ]
  }
}
{
  "DotNetListSettings": {
    "Framework": "net8.0",
    "Sources": [
      "C:\\Projects\\MySolution\\Project1.csproj",
      "C:\\Projects\\MySolution\\Project2.csproj"
    ]
  }
}

Usage

Follow these steps to use the application:

  1. Download latest Release.
  2. Configure the application by modifying appsettings.json according to your needs.
  3. Run the tool using the generated csv-package-list executable and analyze the dependencies.
  4. The tool will generate a packages.csv file in the specified working directory with the following structure:
Newtonsoft.Json;13.0.1
Serilog;2.10.0

About

CsvDotNetPackageList is a .NET utility that scans a solution for NuGet package dependencies including transitive and exports them to a CSV file.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published