what is major difference between dotnet publish and dotnet pack

dotnet packProduces a NuGet package of your code.

That is the key difference – this will enable to publish to http://nuget.org, or to a nuget server that can be pulled down by other developers, or even for use with Octopus Deploy.

dotnet publishProduces a .NET framework-dependent or self-contained application.

Keyword is “self-contained”, a installer perhaps, or a folder that can be deployed by copying/pasting between hosts.

Leave a Comment