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.
- 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.
- 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.
To customize the behavior of the tool, you can modify the appsettings.json
file as follows:
{
"DotNetListSettings": {
"Framework": "net8.0",
"Sources": [
"C:\\Projects\\MySolution.sln"
]
}
}
{
"DotNetListSettings": {
"Framework": "net8.0",
"WorkingDirectory": "C:\\Projects\\MySolution",
"Sources": [
"Project1.csproj",
"Project2.csproj"
],
}
}
Follow these steps to use the application:
- Clone the repository:
git clone https://github.com/SergerGood/CsvDotNetPackageList.git
- Publish the application. The result will be in subfolder
out
.
./publish.sh
- Configure the application by modifying
appsettings.json
according to your needs. - Run the tool using the generated
csv-package-list
executable and analyze the dependencies. - 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