Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/microsoft/NugetNinja
A tool for detecting dependencies of .NET projects.
https://github.com/microsoft/NugetNinja
cli csproj dependencies dotnet nuget
Last synced: 10 days ago
JSON representation
A tool for detecting dependencies of .NET projects.
- Host: GitHub
- URL: https://github.com/microsoft/NugetNinja
- Owner: microsoft
- License: mit
- Created: 2022-07-25T07:29:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-19T03:08:11.000Z (about 1 year ago)
- Last Synced: 2024-08-02T14:07:55.211Z (3 months ago)
- Topics: cli, csproj, dependencies, dotnet, nuget
- Language: C#
- Homepage:
- Size: 220 KB
- Stars: 86
- Watchers: 10
- Forks: 9
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Nuget Ninja (A Hackthon project)
![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)
![Build Status](https://github.com/microsoft/NugetNinja/actions/workflows/build.yml/badge.svg)(Nuget Ninjia was not built or released as a production product. Instead it was our hackthon project while we prefer opensource. It was not officialy release by Microsoft as a product.)
(Non-production! This project is still working in progress...)
Nuget Ninjia is a tool for detecting dependencies of .NET projects. It analyzes the dependency structure of .NET projects in a directory and builds a directed acyclic graph. And will give some modification suggestions for Nuget packages, so that the dependencies of the project are as concise and up-to-date as possible.
## Usage
After getting the binary, run it directly in the terminal.
```cmd
C:\workspace> ninja.exeDescription:
Nuget Ninja, a tool for detecting dependencies of .NET projects.Usage:
Microsoft.NugetNinja [command] [options]Options:
-p, --path (REQUIRED) Path of the projects to be changed.
--nuget-server If you want to use a customized nuget server instead of the official nuget.org,
--token The PAT token which has privilege to access the nuget server.
-d, --dry-run Preview changes without actually making them
-v, --verbose Show detailed log
-?, -h, --help Show help and usage informationCommands:
all, all-officials The command to run all officially supported features.
remove-deprecated The command to replace all deprecated packages to new packages.
upgrade-pkg The command to upgrade all package references to possible latest and avoid conflicts.
clean-pkg The command to clean up possible useless package references.
clean-prj The command to clean up possible useless project references.
```## How to build and run locally
Requirements about how to develop.
* [.NET SDK 6.0](https://github.com/dotnet/core/tree/master/release-notes)
1. Execute `dotnet restore` to restore all .NET dependencies.
2. Execute the following command to build the app:
* `dotnet publish -c Release -r win-x64 --self-contained` on Windows.
* `dotnet publish -c Release -r linux-x64 --self-contained` on Linux.
* `dotnet publish -c Release -r osx-x64 --self-contained` on Mac OS.
3. Execute `dotnet run` to run the app## Run in Microsoft Visual Studio
1. Open the `.sln` file in the project path.
2. Press `F5`.## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.## Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.