Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cxuesong/nugetdepends
A simple command line tool that helps you sort out the NuGet package dependency hierarchy in packages.config.
https://github.com/cxuesong/nugetdepends
nuget
Last synced: 5 days ago
JSON representation
A simple command line tool that helps you sort out the NuGet package dependency hierarchy in packages.config.
- Host: GitHub
- URL: https://github.com/cxuesong/nugetdepends
- Owner: CXuesong
- License: mit
- Created: 2018-02-03T14:39:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-03T14:40:02.000Z (almost 7 years ago)
- Last Synced: 2024-10-30T02:37:56.742Z (about 2 months ago)
- Topics: nuget
- Language: C#
- Size: 57.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# NuGetDepends
A simple command line tool that helps you sort out the NuGet package dependency hierarchy in `packages.config`. Hopefully, this tool can reduce the pain when you are migrating an existing project to .NET Standard / .NET Core.
## Prerequisite
* [.NET Core 2.x Runtime/SDK](https://www.microsoft.com/net/download)
## Usage
* `git clone` this repository
* change the current directory to `NuGetDepends` project folder
* `dotnet run ConfigPath --framework:Framework`, where
* `ConfigPath` is the location of your `packages.config`, i.e. NuGet config file for .NET Framework projects
* `Framework` is the target framework of your project.## Example
There is a `packages.config` in Microsoft's [`BotBuilder-Azure`](https://github.com/Microsoft/BotBuilder-Azure/tree/master/CSharp/Library/Microsoft.Bot.Builder.Azure) , a .NET Framework 4.6 library with 24 NuGet package dependencies. Obviously, some of the packages are only the dependencies of other packages. When migrating this library to .NET Standard, I need to figure out a minimal set of packages so I could keep the migrated csproj file clean & tidy.
In the project directory, use this tool as follows
```powershell
dotnet run "E:\Repos\BotBuilder-Azure\CSharp\Library\Microsoft.Bot.Builder.Azure" -framework:net46
```After a while, the package dependency tree will be shown as follows
![BotBuilderAzure](Images/BotBuilderAzure.png)
So for a minimal set of references, ideally I only have to add the following NuGet packages in my new csproj file
* EntityFramework
* Microsoft.Azure.DocumentDB
* Microsoft.Bot.Builder.History
* Microsoft.IdentityModel.Protocol.Extensions
* NuGet.CommandLine
* WindowsAzure.StorageAfter some adjustments, I will be able to sort them out, such as choosing appropriate .NET Standard counterparts of the packages listed above, and ultimately, [migrate this library to .NET Standard](https://github.com/CXuesong/BotBuilder-Azure-Standard).