-
How to create a nuget package
-
How to publish it on nuget.org
Loading
How to create a nuget package
How to publish it on nuget.org
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Dec 21, 2023, 4:18 AM
Hi Jayraj,
Please find below links that will help you to understand how to create a Nuget package,
https://learn.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio?tabs=netcore-cli
https://www.c-sharpcorner.com/article/how-to-create-and-publish-nuget-package-using-visual-studio-with-net-7/
https://learn.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli
Create a NuGet Package Configuration File:
Add -> New Item....YourProjectName.nuspec.Configure the .nuspec file:
Open the
.nuspecfile and provide the necessary information like title, version, author, description, etc.4. Build your project
5. Pack Your Project:
This will generate a NuGet package in the
bin\Debugorbin\Releasefolder.6. Publish to NuGet.org:
Create a NuGet.org Account:
If you don't have one, create an account on NuGet.org.
Obtain API Key:
Publish Using Visual Studio:
Publish.NuGet.orgas the target.Publish.7. Try to add your package in other project:
Visit NuGet.org and search for your package to ensure it's published correctly.
check, Your NuGet package is now published. you can be consumed by others using NuGet package manager in Visual Studio for other projects.
Anandu G NathPosted Dec 21, 2023, 4:08 AM
Hai
Refer Below Link for More Details
https://www.c-sharpcorner.com/article/create-and-publish-a-nuget-package-using-visual-studio-net-standard/
https://learn.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio?tabs=netcore-cli
Quickstart: Create and publish a package using Visual Studio (.NET Framework, Windows) | Microsoft Learn
Creating a Nuget Package - Step by Step - CodeProject
Satyaprakash SamantarayPosted Dec 9, 2023, 8:33 PM
Hi,
I was trying other sites but these are not for all scenarios.
Then I follow these below official links and it works for me. Follow any of these.
Amit MohantyPosted Dec 8, 2023, 10:03 AM
Please review the following articles.
https://www.c-sharpcorner.com/article/how-to-create-and-publish-nuget-package-using-visual-studio-with-net-7/
https://www.c-sharpcorner.com/article/create-and-publish-a-nuget-package-using-visual-studio-net-standard/
https://github.com/NuGet/docs.microsoft.com-nuget/blob/main/docs/quickstart/create-and-publish-a-package-using-visual-studio.md