Skip to content

enricosada/dotnet-mergenupkg

Repository files navigation

dotnet-mergenupkg

Build status Build status

Merge two nuget package

Useful to add .NET Core dependencies (assemblies, nuspec deps, tools) built with .NET Core Sdk inside an existing .nupkg

dotnet mergenupkg --source a.nupkg --other b.nupkg --framework netstandard2.0

The above command will modify the package a.nupkg adding the package dependencies and files (assemblies, xmldoc) for target framework netstandard2.0 from package b.nupkg

With --tools merge the dotnet tools instead of lib, to bundle a .net core framework dependent app, who can be useful if a package need to run a tool from a known location (like in a .Sdk package)

see dotnet mergenupkg --help for more info

Usage

Add it as .NET Tool

dotnet tool install -g dotnet-mergenupkg --verson 3.*

After that, it can be invoked with

dotnet mergenupkg --help

Build

Clone repo.

Run:

dotnet build

To run tests:

dotnet test -v n

To create packages:

dotnet pack

will create packages in bin\nupkg

pass /p:Version=1.2.3 to create a package with version 1.2.3