Skip to content

tom-englert/PackageReferenceNormalizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Normalizes the package references in project files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages