https://github.com/RustyDaemon/net-binobj-cleaner
Clean up bin and obj directories in .NET projects efficiently with this Rust utility.
https://github.com/RustyDaemon/net-binobj-cleaner
bin-obj-cleaner cleaner dotnet rust
Last synced: 4 months ago
JSON representation
Clean up bin and obj directories in .NET projects efficiently with this Rust utility.
- Host: GitHub
- URL: https://github.com/RustyDaemon/net-binobj-cleaner
- Owner: RustyDaemon
- License: apache-2.0
- Created: 2024-06-23T20:47:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-26T18:48:08.000Z (over 1 year ago)
- Last Synced: 2025-06-30T01:39:03.045Z (8 months ago)
- Topics: bin-obj-cleaner, cleaner, dotnet, rust
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# .NET Project Cleaner (net-binobj-cleaner)
## Overview
This is a command-line utility written in Rust for developers working on .NET projects. It helps to clean up unnecessary `bin` and `obj` directories recursively within a specified .NET project directory, providing detailed information before performing any deletions.
## Features
- Recursively scans for `.csproj` files within a specified directory.
- Collects and displays information about the `bin` and `obj` directories for each project, including the number of files and total disk space used.
- Lists all files to be deleted, sorted alphabetically.
- Prompts for user confirmation before deleting the bin and obj directories.
- Supports configurable maximum depth for directory scanning.
## Prerequisites
**Rust**. Ensure that Rust is installed on your system. You can install Rust from [rust-lang.org](https://rust-lang.org).
## Building the Project
Clone the repository and build the project:
```bash
git clone https://github.com/RustamIrzaev/net-binobj-cleaner.git
cd net-binobj-cleaner
cargo build --release
cd target/release
# Run the application
./net-binobj-cleaner -f
```
### Parameters
- `-f` or `--folder` (required): Path to the .NET project directory.
- `--max-depth` (optional): Maximum depth for directory scanning. Default is 50.
## Example output
```markdown
Project: MyProject
/bin (4 files, 17 Kb):
- MyProject.dll
- MyProject.deps.json
- MyProject.pdb
- MyProject.runtimeconfig.json
/obj (5 files, 18 Kb):
- MyProject.AssemblyInfo.cs
- MyProject.AssemblyInfoInputs.cache
- MyProject.dll
- MyProject.genruntimeconfig.cache
- MyProject.pdb
Do you want to delete these directories? (yes/no)
...
```
## Important Notes
Use with care! This utility deletes files and directories permanently. Make sure to back up your data before running the application.
## License
This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE.md) file for details.