MultiPublish 0.1.0

dotnet tool install --global MultiPublish --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local MultiPublish --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=MultiPublish&version=0.1.0
                    
nuke :add-package MultiPublish --version 0.1.0
                    

MultiPublish

Tests NuGet Version NuGet Downloads License: MIT

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 --runtime and --self-contained parameters
  • 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-x64 self-contained
  • win-x64 framework-dependent
  • win-x86 self-contained
  • win-x86 framework-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.zip
  • MinerUHost-win-x64-framework-dependent.zip

Requirements

  • .NET 8.0 or later
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.0 201 11/5/2025