Amusing 0.3.0
dotnet tool install --global Amusing --version 0.3.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 Amusing --version 0.3.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Amusing&version=0.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package Amusing --version 0.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Amusing
A command-line tool that shows what namespaces you am-using.
Intended to help make the best use of the implicit usings features of C# 10 / .NET 6.
Example
$ amusing MySolution.sln
225 Xunit
207 Moq
151 BigCorp.Splines.Reticulator
<snip>
This shows that both Xunit
and Moq
namespaces are widely used.
Assuming C# 10 or later and .NET SDK 6 or later, we can make those explicit by placing a Directory.Build.props
file in our test/
path, containing:
<Project>
<ItemGroup>
<Using Include="Xunit" />
<Using Include="Moq" />
</ItemGroup>
</Project>
With that, all source under that location will implicitly import those namespaces.
You can run a Roslyn codefix to remove the previous using Xunit;
and using Moq;
directives, which will now be marked as redundant.
Installation
This utility is provided as a .NET global tool.
dotnet tool install -g amusing
Thanks
- Spectre.Console for making the console output more fun.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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-browser 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)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.