NuGetizer 1.4.2

NuGetizer is a drop-in replacement for the .NET SDK built-in Pack (a.k.a. "SDK Pack") which instantly supercharges your ability to customize and extend the packing process in a consistent and easy to understand process designed and centered around best practices in MSBuild design and extensibility.

Yes, this means you'll never need to write a .nuspec by hand ever again, no matter how complicated or advanced your packing scenarios are.

Comprehensive and intuitive heuristics built from experience building nuget packages for over a decade make getting started with NuGetizer seamless and easy, while still accomodating the most advanced scenarios through plain MSBuild extensibility. Out of the box, NuGetizer supports:

  • Drop-in replacement for the built-in .NET SDK Pack
  • Packing project references (including transitive references)
  • Straightforward support for smart libraries packing needs
  • Packing multi-targeted projects, including framework-specific resources and dependencies
  • Fast iterative development with complementary dotnet-nugetize command line tool
  • Comprehensive diagnostic analyzers to provide guidance on packing best practices
  • Consistent and predictable naming for package content inference behaviors:
    • Pack=[true|false] => Include/exclude from package (on any item, such as PackageReference, ProjectReference, None, Content, etc.)
    • PackFolder=[folder] => Name of known folders with special behavior, such as Lib, Build, Content, Tools, etc. (as a project property or item metadata)
    • PackagePath=[path] => Package-relative path (on any item, such as None, Content, etc.)
    • Pack[Item Type]=[true|false] => Set default pack behavior for all items of a given type via simple properties (such as PackNone, PackContent, PackBuildOutput, PackDependencies, PackFrameworkReferences, PackEmbeddedResource, PackResource etc.)
  • Packaging projects using .msbuildproj and Microsoft.Build.NoTargets SDK
  • SourceLink support to populate repository information in the package
  • Automatic readme.md inclusion in the package
  • Support for content includes in readme
  • Package validation enabled by default for release multi-targeting packages.

It's strongly recommended that you install the dotnet-nugetize tool to get the best experience with NuGetizer:

dotnet tool install -g dotnet-nugetize

Given the following project:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>

    <PackageId>Quickstart</PackageId>
    <Authors>NuGetizer</Authors>
    <Description>NuGetized quickstart</Description>

    <PublishRepositoryUrl>true</PublishRepositoryUrl>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="NuGetizer" />
    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" 
                      PrivateAssets="all" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
  </ItemGroup>

  <ItemGroup>
    <None Include="none.txt" Pack="true" />
    <Content Include="content.txt" Pack="true" />
    <Compile Update="@(Compile)" Pack="true" />
  </ItemGroup>

</Project>

Running nugetize on the project directory will produce:

nugetize quickstart

A typical packaging .msbuildproj project for a smart multi-targeted library might look like the following:

<Project Sdk="Microsoft.Build.NoTargets/3.7.0">

  <PropertyGroup>
    <PackageId>Quickstart</PackageId>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="NuGetizer" />
    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" 
                      PrivateAssets="all" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Analyzer\Quickstart.CodeAnalysis.csproj" />
    <ProjectReference Include="..\Build\Quickstart.Tasks.csproj" />
    <ProjectReference Include="..\Lib\Quickstart.csproj" />
    <ProjectReference Include="..\Tools\Quickstart.csproj" />
  </ItemGroup>

</Project>

And produce the following nugetize tool output:

nugetize smart library

You can open this sample and run it directly in your browser in a GitHub Codespace

Learn more about NuGetizer and its capabilities from the project documentation site.

Open Source Maintenance Fee

To ensure the long-term sustainability of this project, use of NuGetizer requires an Open Source Maintenance Fee. While the source code is freely available under the terms of the MIT License, all other aspects of the project --including opening or commenting on issues, participating in discussions and downloading releases-- require adherence to the Maintenance Fee.

In short, if you use this project to generate revenue, the Maintenance Fee is required.

To pay the Maintenance Fee, become a Sponsor at the corresponding OSMF tier (starting at just $10!).

Sponsors

Clarius Org MFB Technologies, Inc. DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Uno Platform Reuben Swartz Jacob Foshee Eric Johnson David JENNI Jonathan Charley Wu Ken Bonny Simon Cropp agileworks-eu Zheyu Shen Vezel ChilliCream 4OTC Vincent Limo Jordan S. Jones domischell Justin Wendlandt Adrian Alonso Michael Hagedorn torutek mccaffers

Sponsor this project  

Learn more about GitHub Sponsors

No packages depend on NuGetizer.

This package has no dependencies.

Version Downloads Last updated
1.4.9 0 06/25/2026
1.4.8 3 06/22/2026
1.4.7 3 06/15/2026
1.4.6 3 06/15/2026
1.4.5 3 06/15/2026
1.4.4 3 06/15/2026
1.4.3 3 06/15/2026
1.4.2 3 06/15/2026
1.3.1 3 06/15/2026
1.3.0 3 06/15/2026
1.2.4 3 06/14/2026
1.2.3 3 06/15/2026
1.2.2 3 06/15/2026
1.2.1 3 06/15/2026
1.2.0 3 06/15/2026
1.1.1 3 06/15/2026
1.1.0 3 06/15/2026
0.9.2 3 06/15/2026
0.9.1 3 06/15/2026
0.9.0 3 06/15/2026
0.8.0 3 06/15/2026
0.7.5 3 06/15/2026
0.7.4 3 06/15/2026
0.7.3 3 06/15/2026
0.7.2 3 06/15/2026
0.7.1 3 06/15/2026
0.7.0 3 06/15/2026
0.6.2 3 06/15/2026
0.6.0 3 06/15/2026
0.5.0 3 06/15/2026
0.4.12 3 06/15/2026
0.4.11 3 06/15/2026
0.4.10 3 06/15/2026
0.4.9 3 06/15/2026
0.4.8 3 06/15/2026
0.4.7 3 06/15/2026
0.4.6 3 06/15/2026
0.4.5 3 06/15/2026
0.4.4 3 06/15/2026
0.4.3 3 06/15/2026