UsingUsings 1.0.0

.NET 7.0
dotnet tool install --global UsingUsings --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local UsingUsings --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=UsingUsings&version=1.0.0
nuke :add-package UsingUsings --version 1.0.0

UsingUsings

A .NET tool that provides statistics on how much you use a using directive. In C# 10, the global using directives feature was added. Essentially, this lets you declare a using directive that's available for all files within a solution:

global using System;

But which using directives in your code base should you make global? That's what this tool does for you. You point it at a directory, and it'll parse all the .cs files within that directory (including all subdirectories), looking for using directives. It'll calculate how often you use a using, and provide a report when it's done so you can determine which ones you use a lot. Those are probably good targets to turn into global usings.

Getting Started

Install the tool (the -g switch means it will be installed as a global tool):

dotnet tool install -g UsingUsings

Prerequisites

This tool targets .NET 7.

Usage

Once the tool is installed, you can run using analysis on code within a directory:

usingusings "My-Target-Directory-Goes-Here"

Additional documentation

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.0 195 3/15/2023
0.2.0 301 12/5/2021
0.1.0 233 11/9/2021