Developing and Distributing NuGet Packages
Creating a re-usable code library
Description
NuGet is the Microsoft-supported mechanism for sharing code. It is a definition of how re-usable code is created for .NET projects and bundled into NuGet packages. It is a tool that helps you create a NuGet package. It is a platform where you can publish your NuGet packages to and share it with other developers. It is a package manager that is integrated with Visual Studio which you can use to consume these NuGet packages. How amazing is that!
In this class you will learn how to develop your very own NuGet package and then publish it to NuGet org! Doesn’t that sound exciting? You will learn what is NuGet in more depth, how to align your thinking when taking the NuGet approach and a lot more.
Project
Your class project is a simple 4-step process as outlined below.
Develop & unit test – Think of a simple idea that your NuGet package will solve. Write some code for it and some unit tests to verify the accuracy of your code and make it maintainable for the future.
Pack & test locally – Create a NuGet package locally and test it locally by setting up a local NuGet feed. Unpackage the NuGet to ensure your files are in there.
Publish to NuGet org – Once confident, publish your NuGet package to NuGet org.
Share the link with this class – Hooray! Now, share the link of your NuGet package with this class. When sharing your class project:
Submit the link to your NuGet org package.
Write about how to use your NuGet package.
Write about your experience of the process.
Watch the class project video for some ideas!
Do follow my teacher profile to stay up-to-date on classes I post and please share this class with your network. And at the end of this class please do not forget to share your reviews about this class.
Happy learning!
What You Will Learn!
- Learn what NuGet is and how it's used.
- Install and use NuGet CLI locally.
- Create a code library and write tests for it.
- Learn semantic versioning.
- Create a NuGet package file and test it locally.
- Publish your NuGet package to NuGet Org.
Who Should Attend!
- You’ve consumed NuGet in the past and want to learn how to develop and distribute your own.
- You’ve not consumed NuGet but want to learn what NuGet is and learn the entire lifecycle right from development to consumption.
- Or, you don’t want to learn about NuGet specifically but want to learn how to align your thinking while developing an independent unit of code that could potentially be reused, how to manage versioning of your code and a lot more that I would classify as derived knowledge.