MultiPublish 0.1.0
dotnet tool install --global MultiPublish --version 0.1.0
dotnet new tool-manifest
dotnet tool install --local MultiPublish --version 0.1.0
#tool dotnet:?package=MultiPublish&version=0.1.0
nuke :add-package MultiPublish --version 0.1.0
MultiPublish
Tired of running dotnet publish over and over again with different parameters to publish for all the different runtimes and options you want to support?
What if you could just use dotnet publish but with parameters that accepted array-like values. Well, now you can.
MultiPublish is a dotnet tool that extends dotnet publish to support multiple runtime identifiers and self-contained options in a single command, with optional zip packaging of outputs.
What It Does
- Supports array syntax for
--runtimeand--self-containedparameters - Automatically executes publish commands for all combinations
- Optionally creates zip files of publish outputs in
bin/MultiPublish/ - Passes through all other arguments unchanged to
dotnet publish
Installation
dotnet tool install -g multipublish
Usage
Multiple Runtimes
Use array syntax to publish for multiple runtimes:
dotnet multipublish -c Release -r [win-x64, win-x86, linux-arm64]
Multiple Runtimes and Self-Contained Options
Publish for multiple runtimes with both self-contained and framework-dependent outputs:
dotnet multipublish -c Release -r [win-x64, win-x86] --self-contained [true, false] /p:PublishSingleFile=true
This will create 4 publish outputs:
win-x64self-containedwin-x64framework-dependentwin-x86self-containedwin-x86framework-dependent
Basic Usage
The goal of multipublish is to be able to serve as a complete replacement for publish. This means that if you want to, you can still use multipublish for scenarios where it isn't actually needed.
For example:
dotnet publish -c Release -r win-x64
Can be replaced with:
dotnet multipublish -c Release -r win-x64
Disable Zip Creation
By default, zip files are created in bin/MultiPublish/. To disable:
dotnet multipublish -c Release -r [win-x64, win-x86] --no-zip
Array Syntax
Arrays can be specified with or without spaces:
-r [win-x64, win-x86, linux-arm64]
--self-contained [true, false]
All other dotnet publish arguments are supported and passed through unchanged.
Zip Output
When zip creation is enabled (default), zip files are created in bin/MultiPublish/ with the naming pattern:
{ProjectName}-{runtime}-{self-contained|framework-dependent}.zip
For example:
MinerUHost-win-x64-self-contained.zipMinerUHost-win-x64-framework-dependent.zip
Requirements
- .NET 8.0 or later
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 201 | 11/5/2025 |