https://github.com/kira-nt/nuget-merge
🌀 A .NET tool that lets you merge multiple .nupkg files into a single package.
https://github.com/kira-nt/nuget-merge
dotnet dotnet-tool merge nuget nupkg
Last synced: 9 days ago
JSON representation
🌀 A .NET tool that lets you merge multiple .nupkg files into a single package.
- Host: GitHub
- URL: https://github.com/kira-nt/nuget-merge
- Owner: Kira-NT
- License: mit
- Created: 2025-09-23T00:03:14.000Z (15 days ago)
- Default Branch: main
- Last Pushed: 2025-09-23T02:22:13.000Z (15 days ago)
- Last Synced: 2025-09-23T02:32:08.053Z (15 days ago)
- Topics: dotnet, dotnet-tool, merge, nuget, nupkg
- Language: C#
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# nuget-merge
[](https://github.com/Kira-NT/nuget-merge/releases/latest)
[](https://github.com/Kira-NT/nuget-merge/blob/HEAD/LICENSE.md)
`nuget-merge` is a small, POSIX-friendly .NET tool that lets you merge multiple `.nupkg` files into a single NuGet package.
For example, if you build .NET Standard 2.0 and .NET Standard 2.1 versions of your library from different source trees, or if you build a tool or an analyzer separately from the library it should be shipped with, `nuget-merge` can combine the resulting packages into one, so you don't need to distribute them separately. Admittedly, this is a fairly niche scenario, and you'll probably never find yourself in one, but when you *do* need something like this, you *really* need it.
This tool, however, is **not** intended for bundling dependencies with your package. If that's what you are looking for, please see [the official MSBuild docs on the topic](https://learn.microsoft.com/en-us/visualstudio/msbuild/tutorial-custom-task-code-generation?view=vs-2022#bundle-dependencies-into-the-package). There's no need to use external tools for that.
----
## Installation
`nuget-merge` is available as a [.NET tool](https://www.nuget.org/packages/nuget-merge), which you can install globally:
```bash
dotnet tool install --global nuget-merge
# nuget-merge in.1.nupkg in.2.nupkg -o out.nupkg
```Or locally:
```bash
dotnet new tool-manifest # If you haven't created a tool manifest yet.
dotnet tool install --local nuget-merge
# dotnet tool run nuget-merge in.1.nupkg in.2.nupkg -o out.nupkg
```Alternatively, `nuget-merge` is also available as a framework-independent precompiled binary for a small selection of popular platforms, which you can download from [the latest release](https://github.com/Kira-NT/nuget-merge/releases/latest).
----
## Usage
```
Description:
Merges multiple .nupkg files into a single package.Usage:
nuget-merge ... [options]Examples:
nuget-merge in.1.nupkg in.2.nupkg in.3.nupkg -o out.nupkg
nuget-merge dist/*.nupkg > out.nupkg
nuget-merge -fd in.out.nupkg in.2.nupkg
cat in.2.nupkg | nuget-merge in.1.nupkg - in.3.nupkg > out.nupkgArguments:
One or more .nupkg files to merge. Files are merged in the order they are provided.Options:
-?, -h, --help Show help and usage information.
--version Show version information.
-o, --output Path to the output .nupkg file. If not specified, the first input file is overwritten.
-f, --force Overwrite the output file if it already exists.
-d, --deterministic Produce a deterministic package merge.
-q, --quiet Suppress all output.
-v, --verbose, --verbosity Set the verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
```----
## License
Licensed under the terms of the [MIT License](https://github.com/Kira-NT/nuget-merge/blob/HEAD/LICENSE.md).