Skip to main content

A tool that scans your project files and normalizes all PackageReference entries to single line entries that only use attribute notation.

Total Downloads
2.0K
2,009
Published
Jul 14, 2022
4y ago

Get Started

dotnet add package PackageReferenceNormalizer --version 1.0.2

No framework information available.

README

Package Reference Normalizer

Build Status NuGet Status

A tool that scans your project files and converts

<PackageReference Include="MyPackage">
  <Version>1.2.3.4</Version>
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

to

<PackageReference Include="MyPackage" Version="1.2.3.4" PrivateAssets="all" />
  • All elements are converted to attributes
  • IncludeAssets is removed if PrivateAssets=All

Instllation

To install the tool, run

dotnet tool install -g PackageReferenceNormalizer

Usage

Run PackageReferenceNormalizer c:\Dev\MyProject\*.csproj

This will scan all *.csproj files in c:\Dev\MyProject and all sub-folders

Run PackageReferenceNormalizer *.csproj

This will scan all *.csproj files in the current directory and all sub-folders

Downloads by Version

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.