Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mysticmind/dotnet-sort-refs

A .NET Core global tool to alphabetically sort package references in your .NET Core and .NET Standard projects.
https://github.com/mysticmind/dotnet-sort-refs

Last synced: 29 days ago
JSON representation

A .NET Core global tool to alphabetically sort package references in your .NET Core and .NET Standard projects.

Awesome Lists containing this project

README

        

# dotnet-sort-refs
[![Build status](https://ci.appveyor.com/api/projects/status/xse0bia9olr5shxr?svg=true)](https://ci.appveyor.com/project/BabuAnnamalai/dotnet-sort-refs) [![NuGet Version](https://badgen.net/nuget/v/dotnet-sort-refs)](https://www.nuget.org/packages/dotnet-sort-refs/)

A .NET Core global tool to alphabetically sort package references in your .NET Core and .NET Standard projects.

If you have benefitted from this library and has saved you a bunch of time, please feel free to buy me a coffee!

GitHub Sponsor

## Why use this tool?
References and package references in a project file are the most updated parts. Sorting the references helps with the following:
- Easier merges on source control (git). Without sorting the package references in the project file, you may end up with more merge conflicts to fix.
- It will be easier to go through the list of package references if you manually edit the file or view changes using a diff tool.

## Installation
```bash
dotnet tool install --global dotnet-sort-refs
```

## Usage
```text
dotnet sort-refs [arguments] [options]

Arguments:
Path The path to a .csproj, .fsproj or directory. If a directory is specified, all .csproj and .fsproj files within folder tree will be processed. If none specified, it will use the current directory.

Options:
--version Show version information
-?|-h|--help Show help information
-i|--inspect Specifies whether to inspect and return a non-zero exit code if one or more projects have non-sorted package references.
```

Note: `dotnet sort-refs` and `dotnet-sort-refs` are valid usages to run the tool.