Creating NuGet Packages the easy way with .NET Standard in C#
IAmTimCorey IAmTimCorey
412K subscribers
101,490 views
0

 Published On Jul 15, 2019

NuGet packages are a way to share versioned code with the world. If you have done any development in C#, you have used NuGet packages, even if you didn't know it. Almost every template in Visual Studio is made up of NuGet packages. That allows us to create flexible applications that upgrade parts of itself without upgrading everything. For instance, if a new version of Dapper comes out, I can continue to use the old version or I can upgrade to the new version. If I have a problem with the new version, I can roll back to the old version.

We take these packages for granted but while almost every developer uses NuGet packages, relatively few ever create NuGet packages. Part of that comes from not thinking about code reusability beyond a given project but a large part of it comes from not knowing how to create NuGet packages. Today, we are going to address that second issue, and at least touch on the first one.

NuGet packages have become so easy to create, we will actually spend more time on deploying, managing, and hosting our packages then we will on creating them.

Patreon (special bonus for $10/month patrons by July 31st):   / iamtimcorey  

Mailing List signup (with exclusive discounts, giveaways, and more): https://signup.iamtimcorey.com/

Package Properties List: https://docs.microsoft.com/en-us/nuge...

0:00 - Intro
2:37 - Getting started: creating .NET standard Library
6:04 - Sharing code library
9:00 - Sharing code library with NuGet package: versions
10:24 - NuGet naming rules
11:26 - NuGet publishing
12:55 - Package feed using Azure DevOps: setup
19:39 - Creating a NuGet package
27:28 - Uploading NuGet to Azure Devops
34:19 - Adding your NuGet to a project: creating a new project
35:51 - Adding your NuGet to a project: NuGet reference and using the package
38:38 - Adding documentation: ReadMe.txt
40:14 - Updating NuGet package: Auto open ReadMe.txt when Nuget package installs, update version, push the new version
44:55 - Automation: DevOps Repository setup, add source control
48:29 - Automation: DevOps "Builds" setup
55:44 - Automation: DevOps "Releases" setup
59:53 - Automation: Code changes, auto-pushing new version, release
1:06:54 - Updating and releasing NuGet package with automation in Azure DevOps
1:10:36 - Summary and concluding remarks

show more

Share/Embed