https://github.com/sergergood/csvdotnetpackagelist
CsvDotNetPackageList is a .NET utility that scans a solution for NuGet package dependencies including transitive and exports them to a CSV file.
https://github.com/sergergood/csvdotnetpackagelist
csv dotnet packages transitive
Last synced: about 1 year ago
JSON representation
CsvDotNetPackageList is a .NET utility that scans a solution for NuGet package dependencies including transitive and exports them to a CSV file.
- Host: GitHub
- URL: https://github.com/sergergood/csvdotnetpackagelist
- Owner: SergerGood
- Created: 2025-01-28T12:20:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-22T19:19:45.000Z (about 1 year ago)
- Last Synced: 2025-03-22T20:24:35.354Z (about 1 year ago)
- Topics: csv, dotnet, packages, transitive
- Language: C#
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 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.
- 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** (_optional_): The base directory used for resolving relative paths and generating the final CSV output file.
- **Sources** (_required_): A list of project or solution files to analyze. If absolute file paths are provided, WorkingDirectory will only be used when generating the final CSV report.
### Example Configuration
To customize the behavior of the tool, you can modify the `appsettings.json` file as follows:
```json
{
"DotNetListSettings": {
"Framework": "net8.0",
"Sources": [
"C:\\Projects\\MySolution.sln"
]
}
}
```
```json
{
"DotNetListSettings": {
"Framework": "net8.0",
"WorkingDirectory": "C:\\Projects\\MySolution",
"Sources": [
"Project1.csproj",
"Project2.csproj"
],
}
}
```
## Usage
Follow these steps to use the application:
1. Clone the repository:
```bash
git clone https://github.com/SergerGood/CsvDotNetPackageList.git
```
2. Publish the application. The result will be in subfolder `out`.
```bash
./publish.sh
```
3. Configure the application by modifying `appsettings.json` according to your needs.
4. Run the tool using the generated `csv-package-list` executable and analyze the dependencies.
5. The tool will generate a `packages.csv` file in the specified working directory with the following structure:
```csv
Newtonsoft.Json;13.0.1
Serilog;2.10.0
```