Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rustamirzaev/nuget_scanner
A powerful tool for C# (.NET) developers to effortlessly scan projects, identify NuGet packages, licenses, check for outdated dependencies, and generate comprehensive reports with detailed package information.
https://github.com/rustamirzaev/nuget_scanner
dotnet nuget nuget-packages rust
Last synced: about 2 months ago
JSON representation
A powerful tool for C# (.NET) developers to effortlessly scan projects, identify NuGet packages, licenses, check for outdated dependencies, and generate comprehensive reports with detailed package information.
- Host: GitHub
- URL: https://github.com/rustamirzaev/nuget_scanner
- Owner: RustamIrzaev
- License: apache-2.0
- Created: 2024-06-19T15:41:02.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-07-26T18:48:44.000Z (6 months ago)
- Last Synced: 2024-10-31T03:21:03.260Z (3 months ago)
- Topics: dotnet, nuget, nuget-packages, rust
- Language: Rust
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MD
Awesome Lists containing this project
README
# NuGet Scanner
## Overview
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](https://github.com/RustamIrzaev/NuGetHelper) that was released many years ago.
## Features
- **Scan C# Projects**. Automatically detects and processes `.csproj` and `packages.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.### Notes
- 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.## Usage
### Prerequisites
- **Rust**. Ensure that Rust is installed on your system. You can install Rust from [rust-lang.org](https://www.rust-lang.org/tools/install).
### Building the Project
Clone the repository and build the project using Cargo:
```bash
git clone https://github.com/RustamIrzaev/nuget_scanner.git
cd nuget_scanner
cargo build --release # builds the projectcd target/release # switch to where the executable is placed
./nuget-scanner -f -r # run nuget-scanner! (see options below)
```### Running the Application
To run the application, specify the directory to scan and optionally the maximum depth for scanning:
```bash
./nuget-scanner -f /path/to/your/csharp/project -r
```### Parameters
- `-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.## Example output
```markdown
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 2024Completed in: 0.23 seconds
```### Example report
Demo report can be found [here](DEMO_LICENSE_REPORT.md).
## License
This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE.MD) file for details.