Contents tagged with NuGet Package

  • Creating NuGet Package using .NET Core CLI

    NuGet is a great tool in managing your third-party dependencies as well as in distributing your own libraries. The dotnet pack command available in .NET Core CLI toolset will help you to build the project and creates a NuGet package. The output of this command will be a .nupkg file which can be used to push to a public registry like or to any other private registries.

    Let's start with a .NET Core class library project and see how we can pack that using the CLI toolchain

    dotnet new class --name SampleLib

    It will create a new project with one file in C# inside it. Let's create a package using the below command