The NuGet Scanner
is a powerful tool designed for C# (.NET) engineers to easily scan their projects, identify used NuGet packages & licenses, check if those packages are outdated, and generate a detailed report.
This application leverages Rust's performance and safety to provide quick and reliable results.
This is the successor of the NuGet Helper that was released many years ago.
- Scan C# Projects. Automatically detects and processes
.csproj
andpackages.config
files within the specified directory. - Identify NuGet Packages. Extracts the list of NuGet packages used in each project.
- Fetch Package Details. Retrieves comprehensive information about each NuGet package from the NuGet API, including:
- Package Name (the name of the NuGet package)
- Current Version (the version of the package currently used in the project)
- Latest Version (the latest available version of the package)
- License URL (a URL pointing to the license information of the package)
- License Type (the license type or expression associated with the package)
- Published Date (the date when the current version of the package was published)
- Check for Outdated Packages. Compares the current version of each package with the latest available version to identify outdated packages.
- Generate Detailed Reports. Outputs a detailed report in markdown file for each project, listing all NuGet packages along with their details and version status.
- Multiple Project Support. Capable of scanning directories containing multiple C# projects, ensuring each project is analyzed individually.
- Execution Time Measurement. Measures and displays the total execution time of the scanning process.
- The application uses the NuGet API to fetch package details. Therefore, an active internet connection is required.
- The inner parser uses NuGet SemVer2 so not every (old) package may be parsed correctly.
- Rust. Ensure that Rust is installed on your system. You can install Rust from rust-lang.org.
Clone the repository and build the project using Cargo:
git clone https://github.com/RustamIrzaev/nuget_scanner.git
cd nuget_scanner
cargo build --release # builds the project
cd target/release # switch to where the executable is placed
./nuget-scanner -f <FOLDER> -r # run nuget-scanner! (see options below)
To run the application, specify the directory to scan and optionally the maximum depth for scanning:
./nuget-scanner -f /path/to/your/csharp/project -r
-f
or--folder
: path to the directory containing the C# project(s).-r
or--report
: to generate a report--max-depth
: (Optional) specifies the maximum depth for scanning directories. Default is 10.
Project: MyProject
- NuGet Package #1, version 13.0.3
license: MIT
license URL: https://github.com/RustamIrzaev/nuget_scanner/license.md
description: Package description
project URL: https://github.com/RustamIrzaev/nuget_scanner
released at: 08 Mar 2023
- NuGet Package #2, version 12.0.3
license: MIT
license URL: https://github.com/RustamIrzaev/nuget_scanner/license.md
description: Package description
project URL: https://github.com/RustamIrzaev/nuget_scanner
released at: 08 Mar 2024
Completed in: 0.23 seconds
Demo report can be found here.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.