DEV Community

Anil Kumar Khandei
Anil Kumar Khandei

Posted on • Edited on

Generate NuGet Package with Octopus CLI

Prerequisites

  • Visual studio code

Create a simple dotnet mvc web app

  • dotnet command to check latest framework version
    dotnet --version

  • cli command to create a new mvc web app along with version specification when you have multiple dotnet frameworks installed locally and you dont want to use the latest one :)-

dotnet new mvc --language C# --framework net5.0

Installing the octopus cli

  • If you want to install Octopus CLI make sure you install it globally using the command-

dotnet tool install Octopus.DotNet.Cli --global

Build / Run / Publish

  • Command to build project-

dotnet build

  • Command to run project-

dotnet run

Check app is up and running using the link generated on the console

  • Command to publish the project

first ctrl+c to stop running the project
run following command to publish project to custom directory-
dotnet publish -o <foldername>

Generate the Nuget Package

  • Command to generate the nuget package from cli-

dotnet-octo pack --id=CodeWithAnil -outFolder=ArtifactFolder --basePath=Publish

--id=projectname
--outFolder=folder where to create the nuget package
--basePath=folder where you published your webapp or api

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay