Creating NuGet Packages the easy way with .NET Standard in C#

  Рет қаралды 102,297

IAmTimCorey

IAmTimCorey

Күн бұрын

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): signup.iamtimcorey.com/
Package Properties List: 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

Пікірлер: 209
@haozheng8400
@haozheng8400 2 жыл бұрын
I'm about to start working as a release manager for the first time. Your video really helps me understand what nuget package is , why we need it and how we use it! Thank you for your selfless sharing!!!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Awesome! I’m glad it was helpful.
@sephiroth4488
@sephiroth4488 3 жыл бұрын
CI/CD was always pretty daunting for me and with your help I just set up my first full pipeline. Thank you so much!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Excellent!
@bobkerman2419
@bobkerman2419 4 жыл бұрын
Thank you Tim, your Tutorial are awesome and professional as always. I'm surprised that you only have 75K subscribers
@samuelketels919
@samuelketels919 4 жыл бұрын
I share the same surprise, if you want to have a good understanding what you are doing, his tutorials are amazing. I'm in a lot developer groups and I can't tell how many times I said 'check out Tim Corey on KZbin'.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
@Bob - Thank you. I appreciate the kind words. @Samuel - Thanks for the recommendations!
@holger_p
@holger_p Жыл бұрын
3 years later it's 500% more subscribers. For special interest, it just takes longer, but videos are viewed over a period of 10 years or so. Not just the 10 days after release.
@emersonstori
@emersonstori Жыл бұрын
Hello, I had looked for an explanation on this subject and even found several published by people of my nationality, but even though I used the automatic translator on KZbin to help me with your videos, your teaching is incredible. I'm a big fan of yours, congratulations 👏👏
@IAmTimCorey
@IAmTimCorey Жыл бұрын
I am glad it was helpful.
@kinsondigital
@kinsondigital 4 жыл бұрын
Very awesome. I have already been doing this and its great. I have 8 different libraries that are all part of a large project and with all the CI/CD setup and the Nuget packages setup, it makes life so much easier. I love what MS is doing with Azure Devops and the direction they are taking with the NET stack.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Sounds great! Azure DevOps is an amazing productivity tool for developers.
@AbubakrMahdiSan
@AbubakrMahdiSan 4 жыл бұрын
I love what you do ,keep it up , hope all the best for you Tim . Thank you
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Thank you!
@bohuang3122
@bohuang3122 2 жыл бұрын
It's my second time to watch this video and really find it's helpful! It let me understand how it works underneath our big project and how we coordinate each other.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Awesome! I am glad it has been so helpful.
@alanrosetrimble
@alanrosetrimble Жыл бұрын
Great tutorial. Looks like some things have changed in Visual Studio 2022, but basically it is the same. Build pipeline stuff at end was a nice bonus.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks!
@carlosf2690
@carlosf2690 Жыл бұрын
Hi Tim, Thanks for your videos. Quick question, can I include in a project a NuGet from an artifact in a different collection? The NuGet restore only allow me to pick Artifacts/TFS Feed from the same collection.
@rlyonsiii
@rlyonsiii 4 жыл бұрын
Hi Tim, will the content Include work for a Readme.md (markdown) file in place of a text file?
@Vietnamkid1993
@Vietnamkid1993 2 жыл бұрын
Private nuget packages. Exactly what I wanted to learn! I can already tell this is going to be a great tutorial video.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Great!
@nelsonrivers8546
@nelsonrivers8546 2 жыл бұрын
Thank you Tim. I have found your videos very helpful. I think you do a pretty good job at explaining topics.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@higherpurpose1212
@higherpurpose1212 Жыл бұрын
This is an awesome video, not just about nuget but learning about Devops CI/CD! Glad I found this!
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks!
@bhuwanmaharjan397
@bhuwanmaharjan397 4 жыл бұрын
Thank you for this awesome tuts Tim
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@maxbitran
@maxbitran 2 жыл бұрын
Hey Tim, very nice job! Now... what is that thing that made the PowerShell transparent effect when you grabbed it and moved it around? :)
@vkpunique
@vkpunique 4 жыл бұрын
Great Video, Lots of Good info especially for non-Traditional programmers
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Thank you!
@thomkb
@thomkb Жыл бұрын
Another great video. In case no one has posted the answer, multiplying 2 numbers gives you a "product."
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks!
@nirmala4059
@nirmala4059 3 жыл бұрын
Tim, I'm creating a nuget package for nlog to keep in my private feed. I created custom layout renderer but when I install the created nuget package, the custom renderer are not working. I followed all the things mentioned in nlog documentation. What's the correct way to do it so that when I install nuget package, the custom renderers would work?
@mihaimyh
@mihaimyh 4 жыл бұрын
Hi Tim, Thanks for the video. How can we mark a version as a preview so it can appear on Visual Studio by clicking the checkbox with includes pre-releases or previews?
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Use semantic versioning to indicate pre-release values like 1.0.1-alpha: docs.microsoft.com/en-us/nuget/create-packages/prerelease-packages
@ramoneliasrodriguezalba7427
@ramoneliasrodriguezalba7427 Жыл бұрын
Just awesome!!! congrats for the good content Tim...!!!
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thank you!
@goldenwoof
@goldenwoof 4 жыл бұрын
Excellent stuff, as always! One question, though: What if the NuGet package I'm creating uses another NuGet package in its code? When someone installs my package from our NuGet server, will it automatically get the package which my package is using? Or are there other steps necessary?
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Yep, if your package uses packages, those other packages are dependencies that will be brought in when installing your NuGet package.
4 жыл бұрын
Very good video. Well timed and precise.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Glad it was helpful!
@tombitsky573
@tombitsky573 4 жыл бұрын
Thank you very much for a great tutorial. One issue not covered in the video that I can't seem to find any information on: when you published using Azure Pipelines, the package name, description and author information changed. I'm having the same problem: the proper information when I publish from the command line, blank information and a different package name when I use Azure Pipelines. Where does one edit the package details when using Azure Pipeline?
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
I can add more info about this in a follow-up video. I believe in my case, I made a change that changed the name from IAmTimCorey.HelperLibrary to HelperLibrary but the description stayed the same. It should be whatever you specify.
@jiraiya3306
@jiraiya3306 6 ай бұрын
Thank you so much ! That material helped me a lot !
@IAmTimCorey
@IAmTimCorey 6 ай бұрын
You are welcome!
@gauravjoshi5054
@gauravjoshi5054 3 жыл бұрын
Hi Tim thanks for informative video session. I have one question I have a .zip file I want to create nuget package for it. how I can do it..? I tried adding this zip into class library and create package but my nupkg file doesn't contain my zip file content. Any suggestion please..?
@shanmukhapatil7131
@shanmukhapatil7131 Жыл бұрын
Hi Tim, great video. Could you please make part 2 of this video and add a debugging part. Like when you link it, if we have errors we need to check for the error, please add that part . 😊 And which all files need to add(like .pdb)
@johnnySchillaci
@johnnySchillaci 2 жыл бұрын
I was about to do something like this, really awesome guide. Than Tim
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@LDdrums20
@LDdrums20 Жыл бұрын
The word that you were looking for was product of the numbers
@noggog5106
@noggog5106 4 жыл бұрын
Amazing video! Thanks so much. One aspect that I'd like to understand more is the best practice for rapid library/user parallel development. For example, if I use the systems you just proposed and add my library as a nuget dependency in my child project, well now it's a 5 minute or more affair to change some code in the library and push it through Azure to "get it" to my child project. Not to mention I need internet access at the time, etc. It makes working on both a library and its user project in parallel somewhat unfeasible. Is there a way to set up a development tip where making a change on the library project can more quickly propagate to my child project? That way I can quickly flip flop between library and user projects and rapidly develop both, and then push through these more official Azure channels once things "settle in"? Cheers!
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
There are ways to do this, yes, including doing a local NuGet feed (not online) for dev or even developing the library directly with the project and then separating it out into a NuGet package once it hits maturity. The key is that NuGet packages aren't typically used for just one project. That is too much separation without a benefit. They are useful when multiple projects need the same library. I'll be doing more content on how to create and work with NuGet packages in the future.
@Ali-xx9sj
@Ali-xx9sj Жыл бұрын
thank you so much! I've been drilling the internet for a solution and only you who has saved the day form me! Again, thank you very much
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Excellent!
@farsidesc4044
@farsidesc4044 4 жыл бұрын
Hey Tim! Thanks again for your videos. As a learner, I find them invaluable! I was wondering if you wouldn't mind explaining simple network connections (between two C# apps), hopefully with the context of a client to server "one-to-many" scenario. The reason I ask is, there are a lot of different ways to do connections (TCP, UDP, NamedPipeServerStreams, etc), and I just can't find a coherent answer as to how to keep multiple connections open, monitor them, and run async processes while connected. That's not so simple of a request, is it? Hmm, well, maybe at least one of those topics in networking then? Best of luck!
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
I don't have videos on these yet (they are coming) but I would recommend looking into SignalR (for real-time communication) or message queuing like RabbitMQ or MassTransit (for async message handling).
@alinazar7998
@alinazar7998 4 жыл бұрын
great tutorial! thanks for this!
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@silentwater79
@silentwater79 4 жыл бұрын
Thanks for your great tutorials. Better than any book you can buy. Would be interested to know how you handle Config Settings especially different Config Settings for Debug, Release,... and how you handle internationalization in WPF Projects especially if you want to switch languages live without restarting the application.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Changing config settings at build can be done with config transforms (either using a tool like Slow Cheetah locally or as part of the build process in something like Azure DevOps). I'm planning on doing a video on internationalization at some point in the semi-near future.
@mainenterprise872
@mainenterprise872 Жыл бұрын
Do you have a link/video for non .Net Core libraries as in the normal Class Library as I don't see the Package option under properties
@robertdoyle7696
@robertdoyle7696 4 жыл бұрын
Nice course. Thank you.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome!
@ElCidPhysics90
@ElCidPhysics90 9 ай бұрын
Quick question and this kind of refers back to the Class Library video. Would there be any advantage to building the dlls projects in the same solution and then creating a dll or nuget solution from the individual projects? This is in contrast to creating a new solution for each project/dll you need?
@IAmTimCorey
@IAmTimCorey 9 ай бұрын
It is usually easier to develop the UI project with the class library, but it really does depend on the situation.
@ElCidPhysics90
@ElCidPhysics90 9 ай бұрын
@@IAmTimCorey thanks, Tim
@sureshpanchanathan
@sureshpanchanathan 2 жыл бұрын
Hi Tim, Very useful video. I was able to follow and create a nuget package, but like the readme.txt file. I have a folder within the project called “configuration” and under it, I have a settings.json file where I store the file paths, db connection etc. and another folder called SQLQueries, under it I have a mysearchsql.txt, pls explain how to package those folders and files as part of the nuget package? I also want the same folder structure myproject/configuration/settings.json and myproject/SQLQueries/mysearchsql.txt to be utilized when I install the package and call the respective methods for db connection as well as method for running the sql query. Please help.
@bwzffgh7
@bwzffgh7 2 жыл бұрын
So many questions I have. Half of my DevOps screens don't look like yours, so I'm struggling to follow your steps. Where is this Build screen that shows the "Artifacts" button at the top that you can use to explore the artifacts (55:30)?? I have been working with DevOps builds for 3 years and have never seen this screen. When I click through a successful build agent job, I only see logs from each step. There are no buttons at the top right (Release, Artifacts dropdown, etc). I would love to see the artifacts that were published after a successful build but have never seen any screen that shows them.
@noblenetdk
@noblenetdk 4 жыл бұрын
I just found your other video on the setup/use of Azure. Thanx
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Excellent!
@pinoyrunningpenguin
@pinoyrunningpenguin Жыл бұрын
How do you do this with 3rd party compiled DLL? I got a DLL which was not in any nuget repository and want it to be in the azure devops nuget feed.
@ZoidbergForPresident
@ZoidbergForPresident 4 жыл бұрын
Quick question: are your private packages really private if they're hosted in a cloud? :P
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Yep. The cloud doesn't mean public. The security level on your private repositories is really impressive. In fact, I recommend small to medium shops host in the cloud rather than maintaining their own servers because they don't have the ability to secure them as well as Microsoft does.
@bhaktipande4576
@bhaktipande4576 3 жыл бұрын
Thank you sir for such easy and awesome video
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Most welcome
@skanyer
@skanyer 4 жыл бұрын
Great video. I don't think it covered adding to the public Nuget, will that be a future video?
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
That will come at some point.
@AndreaTani
@AndreaTani 4 жыл бұрын
Thank you for this guide! I tried building a package of a project that has other NuGet packages as dependencies, but they're neither included on the package nor listed as dependencies in the NuGet Package manager, could you help or point in the right direction? I don't seem to find any indication of this issue online. Thanks
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Are you sure they didn't come through? Typically, they are brought in but not shown in your installed packages list.
@AndreaTani
@AndreaTani 4 жыл бұрын
@@IAmTimCorey Yes, unfortunately I'm sure. I opened the package file and they weren't there, furthermore, when I see the log of the NuGet Pack step, there is no mention of dependency inclusion
@pinoyrunningpenguin
@pinoyrunningpenguin Жыл бұрын
How do you change the target to 4.7.2? I have to use the DLL to 4.7.2. I just referenced a 3rd party DLL.
@zirexpl6395
@zirexpl6395 2 жыл бұрын
Hi tim, geat material! but I have got one question. What's the best option to debug my nugetpackage? I mean, I created a nuget, publish nugget, my application A is using that nuget, I added something new to my nuget, published that, updated on Application A, but if i want to test and debug that on Application A, what's the best way? (my nuget package is not testable by self, needs to be tested by application A)
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
The best option is to debug before it becomes a NuGet package. You can use the PDB file to debug the NuGet package in place, but it is more complicated.
@jax2059
@jax2059 4 жыл бұрын
@Tim do you need to buy Azure Dev Ops?
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Nope, it is free for most situations (teams up to 5 people and businesses who gross less than $1 million per year).
@Kimley-HornandAssociatesIncGMa
@Kimley-HornandAssociatesIncGMa 2 жыл бұрын
Good job Tim, awesome video
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks!
@Ankushbindlish
@Ankushbindlish 4 жыл бұрын
Great video Release pipeline can have CI enabled. Csproj pkg version would trigger actual push, rest ignored. Add example where proj relies on 2 external PackageSources.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
I'll add that suggestion to the list
@neerajchouksey3761
@neerajchouksey3761 4 жыл бұрын
Thanks Tim . I am using dotnet publish command to build and publish my solution . nuget package from different solution is required to build current solution . What can i do dotnet so that publish command consume the latest nuget package. FYI, I am not using Azure Devops
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
It sounds like this is what you are looking for: stackoverflow.com/questions/42694079/always-use-latest-version-of-nuget-package
@satori8626
@satori8626 Жыл бұрын
Hi Tim, thank you for another great video. I have created a generic class library and uploadet it as a NuGet package to Azure DevOps. When I download and use it in a separate project, it generally works great. However I can't debug into the class library code, as the debugger skips over it.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
That's a setting in visual Studio. You do need to include the pdb file in the NuGet package, too.
@satori8626
@satori8626 Жыл бұрын
@@IAmTimCorey Oh I see, could you please let me know which setting it is?
@austinvalentine5781
@austinvalentine5781 11 ай бұрын
@@IAmTimCorey If you are talking about source link, it doesn't just work, especially if you are using nuget packages published via local on-premises Azure DevOps pipelines, which I can't tell support symbols servers. The whole situation is a confusing mess.
@LPDaVinci
@LPDaVinci 2 жыл бұрын
thats cool.. i dont understand how i can make in vs 2022 when my project gets builded all dependancies (nuget packages) are in the root folder but i want them in a /lib folder not where the executable is.. what i need to edit/create to get this work
@StudentCompanion
@StudentCompanion 4 жыл бұрын
Thanks
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@sonasona6
@sonasona6 2 жыл бұрын
Hi Tim , Is it possible to create a nuget package with hooks file , interfaces , class files and use it for many projects please ? when i tried to create a pack it didnt create a nuget package in this video 26.01 location ..that step didnt work for me .. could you please help on this ?
@RalfsBalodis
@RalfsBalodis 3 жыл бұрын
It didn't look like you changed package ID in the properties. Confused about the nuget package name change after automating the process. I guess it is because package names are reserved. The name was already in use so it defaulted to the Project name instead? What if it was two identical project names? Would it then append "1" to your NuGet package name?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I believe it is because of how the NuGet package system works in Azure DevOps. I'll work on getting that improved.
@SilverWire10
@SilverWire10 2 жыл бұрын
how to make a package support cmdlet to use from nuget package manager console like in entityframework "add-migration" , update-database , etc... ?
@MrFoghorn111
@MrFoghorn111 3 жыл бұрын
Hey Tim, I'm finding a dearth of documentation regarding using nuget to distribute js files and libraries in web projects. Especially Asp.Net Core projects. Client side code code just isn't well documented. What I'm trying to accomplish is akin to the way jquery is installed using Nuget. Any resources you can point me to that have clear documentation on this topic?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Typically, we don't use NuGet for client-side JavaScript files (we used to). The problem is having one more place to update when new versions come out. Instead, we use standard tools like npm.
@MrFoghorn111
@MrFoghorn111 3 жыл бұрын
IAmTimCorey yep. Took a lot of reading before I figured that out. How often the simple solutions elude me... I do find having two separate package managers annoying, but I cracked open the NPM documentation on Tuesday. At least npm can also live in my azure DevOps pipeline.
@andywalter7426
@andywalter7426 3 жыл бұрын
I have one question. Is it possible to have a github action where everytime you commit something, it can publish to nuget. I would be disappointed if the only way a person can do this would be to disclose the key in the actions which means if you have the open source project as public, then they have your keys which is bad. I would love to see a video about a github action so everytime a person commits, github can build and post on nuget.
@swan4959
@swan4959 3 жыл бұрын
Hi Tim, can you tell me what extra steps (in vs studio2019 and SSMS) i will need to do if i want to implement ms sql server in the C# code for creating a nuget package? It would be rlly awesome if u reply thxs.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You can't really put a SQL database into a NuGet package, if that is what you are asking for.
@swan4959
@swan4959 3 жыл бұрын
Thxs for the reply Tim. You are the best : )
@VinuP2023
@VinuP2023 4 жыл бұрын
Thank you Tim for the video. Can you please add into suggestion list: a video on Powershell for C# developers
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
It is on the list. Thanks for the suggestion.
@joshibhushan1
@joshibhushan1 Жыл бұрын
Great video. For dotnet core 7 , when I am trying to do pack then .nupkg file is not getting generated. Any ideas ??
@SubhojeetNeogy
@SubhojeetNeogy 4 жыл бұрын
Thanks Tim
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@raghur5678
@raghur5678 Жыл бұрын
thanks for the video.. my question is i have two organisations , i want to push the Nuget packages to the Both organisation. how can i push it. is that possible? if yes then How can i?
@user-qn9vf7vd1m
@user-qn9vf7vd1m 3 жыл бұрын
That tutorial was pretty poggers
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@xavier71326
@xavier71326 4 жыл бұрын
thank u a lot. U are the best.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@harikachowdarybonthu5772
@harikachowdarybonthu5772 4 жыл бұрын
Can we create these kind of feeds without azure or myget ?? If we want to use NuGet Server itself how can we create feeds ??
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You mean NuGet.org? Just sign up and upload your packages. You can also host your own NuGet feed on a private server (or even your own machine).
@belmiris1371
@belmiris1371 4 ай бұрын
Thanks!
@IAmTimCorey
@IAmTimCorey 4 ай бұрын
Thank you!
@andrewshwets1316
@andrewshwets1316 3 жыл бұрын
Keep it up Man!!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks! Will do!
@skanyer
@skanyer 4 жыл бұрын
26:20 Do you want it in debug when you pack? Does it matter?
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
It seems to be a bit of a preference thing based upon how you want your symbols to be built and how easy you want it to be to debug. In general, though, when you go to push your production version, default to release build unless you have a really good reason not to.
@rodrigoskw1
@rodrigoskw1 3 жыл бұрын
Perfect !
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great!
@AhmedHassan-gk3tx
@AhmedHassan-gk3tx 2 жыл бұрын
Is there is a way to automatically update the version number with each build ?
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
To an extent. Just remember that the version number isn't just an incrementing number. We choose when to update the minor and major version numbers based upon what type of changes have been added, which takes human intervention.
@nwedge4
@nwedge4 Жыл бұрын
I was really hoping this would include multiple project templates since that topic in not easily found.
@mads3564
@mads3564 Жыл бұрын
This video helps me to create a nuget package succesfully! Unfortunately I can't figure out how to include the third party packages (e.g. Dapper) correctly.
@mads3564
@mads3564 Жыл бұрын
I managed to find the issue. The Nuget pack task doesn't work for .net core libraries that has references to other packages, for that you need the .Net core pack task.
@Rajeshsingh-ws5th
@Rajeshsingh-ws5th 4 жыл бұрын
Hi Tim great tutorial, I succeed to create nuget pkg and done with CI. after uploading 2 versions unable to get access organization setting option. It seem my account became user only.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Maybe you logged in with different credentials? Or maybe they were revoked.
@Rajeshsingh-ws5th
@Rajeshsingh-ws5th 4 жыл бұрын
@@IAmTimCorey Thanks , I solved my problem by disconnecting it from Azure AD. Tim you are good, I like your videos. Keep train us.
@telengardforever7783
@telengardforever7783 3 жыл бұрын
Everytime you say "I am Tim Corey," I can't help but think of Rachel Corrie.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Interesting association.
@telengardforever7783
@telengardforever7783 3 жыл бұрын
@@IAmTimCorey Her movie, "My Name Is Rachel Corrie" sounds similar to you saying "I am Tim Corey."
@torrvic1156
@torrvic1156 11 ай бұрын
Thank you so much for another awesome lesson Tim! Can you kindly tell me as to where should we use several solutions for one application and then implements other necessary things with NuGet packages? I know that it depends but maybe you can recommend some article or guiding principle for this. Regards to my pathetic experience I only saw application with several layers separated into different projects in one Solution. You calling your solution a bucket Tim but I am calling my solution a toilet 😂
@Mark4nov
@Mark4nov 3 жыл бұрын
Hmm, I'm thinking, what can I do with those "versions" where I'm just testing if something works? How can i test my changes without publish a new version to everyone? Thanks a lot for this new perspective, i was thinking in put my release dlls into OneDrive xD.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Create pre-release versions that don't get published to the main feed. You can create an alpha and beta feed (or just one pre-release feed) that early adopters and testers can use.
@Mark4nov
@Mark4nov 3 жыл бұрын
@@IAmTimCorey ooohhh, thankyouuuu, i'll start with my experiments muahaha
@petros.ioannou
@petros.ioannou Жыл бұрын
Very nice video! It would be nice to have a video on how to use nuget in Docker
@IAmTimCorey
@IAmTimCorey Жыл бұрын
What do you mean? Typically, you deploy complete applications to Docker, which means they already have their NuGet packages integrated. Is there something different that you are looking for?
@petros.ioannou
@petros.ioannou Жыл бұрын
@@IAmTimCorey My mistake. yes you are right. Thanks
@MrXhabi
@MrXhabi 3 жыл бұрын
Hi Tim Great video. Can you please make a video for generic class for httpclient or httpclient factory with CRUD operations that can be used for all api calls
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@dwillingham
@dwillingham 3 жыл бұрын
I seem to run into an error getting my release pipeline working. I get an error that "User XXX lacks permission to complete this action." from the agent that is trying to push the artifact to the feed.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
It sounds like you need to update your feed's permissions. This might help: stackoverflow.com/questions/58780741/user-lacks-permission-to-complete-this-action-you-need-to-have-addpackage
@dwillingham
@dwillingham 3 жыл бұрын
@@IAmTimCorey Thanks! I was able to get it to work and the issue what that the default feed permissions didn't allow the build agent to push the artifact to it. i.stack.imgur.com/OX9nR.png is the setting I had to change to get it working.
@acp3012
@acp3012 2 жыл бұрын
Hi Tim, it is really awesome video. You have explained how to create Nuget packages and use in a project. Do you have any vedio that explains how to build a nuget package with multiple DLLs?. What i mean is that, I have around 20 Dlls (Class libraries) each has its own task. I want to provide it as a single nuget package. Thank you
@bhaktipande4576
@bhaktipande4576 3 жыл бұрын
Hello sir i have created one demo application and trying to access it in our console application then dll is generated but enable to it through Using statement there. could you please help me ?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I'm sorry, I'm not sure what you are asking. However, I also don't have the ability to debug your application (nor the time). Use this as an opportunity to improve your debugging skills. You can do this.
@laxmannagtilak8362
@laxmannagtilak8362 3 жыл бұрын
Can you do the same video with the GitLab package registry?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
I noted your recommendation by adding it to Tim's list of possible future topics, thanks.
@ContentsOfTable
@ContentsOfTable 4 жыл бұрын
I suggest adding NuGet.exe to where its most convenient to the developer then adding it to the system environment variables so that there is no fuss with paths in scripts or tooling.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Thanks for the suggestion.
@rexkenley
@rexkenley 4 жыл бұрын
The result of multiply is called product.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Thanks! I was drawing a blank.
@usamaaziz4349
@usamaaziz4349 3 жыл бұрын
How can I add reference to namespace System.Data.SqlClient?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Just add a using statement. It should be already installed for you.
@usamaaziz4349
@usamaaziz4349 3 жыл бұрын
@@IAmTimCorey Well. That didn't worked and I don't know why. I had to add this line in MyProject.csproj inside tag Can you tell me why did that heppened?
@zaidalikhan2749
@zaidalikhan2749 Жыл бұрын
How to work with Nuget pkg in VS Code?
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@ishanpand3y
@ishanpand3y 10 күн бұрын
Hi Corey, this lecture seems bit outdated could you please make new video with latest VS2022 and latest Azure DevOps.
@IAmTimCorey
@IAmTimCorey 10 күн бұрын
Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@MrTombombodil
@MrTombombodil 2 жыл бұрын
Would you ever considering doing a video on creating .NET Template Packages for distributing project templates via nuget??
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@Kajalkatt
@Kajalkatt 2 жыл бұрын
If anyone else is having problems - I had issues with not being able to do the Nuget push. I had to set the permissions for the feed to "Allow project-scoped builds"
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks for sharing.
@ALFREDVPAUL
@ALFREDVPAUL 4 жыл бұрын
excellent Video can you help me how to Include a json file in package .
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
I can add that to the suggestion list for the next video on NuGet.
@ALFREDVPAUL
@ALFREDVPAUL 4 жыл бұрын
@@IAmTimCorey thanks will be waiting for it.
@medusaskull9625
@medusaskull9625 Жыл бұрын
How do you debug with step into debug package?
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Include the PDB file with your package.
@medusaskull9625
@medusaskull9625 Жыл бұрын
@@IAmTimCorey Wow, you are actually answering my question. Thank you. Do you have a video where you show how? I do have the pdb file in my nuget package for both debug and release. However, when I break and tried to use F11, the debugger just step right through and not into the package code.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
I don't have a video on that, but it is on the suggestion list I believe.
@mb-ql1gb
@mb-ql1gb 2 жыл бұрын
I ordered some chicken nuget at McDonald´s last week ... they sent me home ... not available ... I dont understand ^^
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
The good news is that you can get a 20-pack for free inside VS.
@mb-ql1gb
@mb-ql1gb 2 жыл бұрын
@@IAmTimCorey IAmNotTimCorey, I dont get anything for free ... I get it for fee ^^ ;D
@torrvic1156
@torrvic1156 11 ай бұрын
@@mb-ql1gbhilarious 😂
@danielkrajnik3817
@danielkrajnik3817 3 ай бұрын
12:15 why would you want to do that Tim?
@IAmTimCorey
@IAmTimCorey 3 ай бұрын
Have personal NuGet packages? Because sometimes you have company-specific or proprietary code that you use in your projects that you want to share between projects.
@dangerfox1776
@dangerfox1776 8 ай бұрын
Classic editor is no longer there :(
@IAmTimCorey
@IAmTimCorey 8 ай бұрын
Yes, it is. I just verified it.
@frozenprakash
@frozenprakash 2 жыл бұрын
I hope Microsoft cuts down these steps so that in a single click with a wizard it's possible to push directly to azure devops as private nuget package.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
They are making the number of steps easier. Not sure if we will get to a single step or not, but it definitely is easier than it used to be.
@MarekSowikowski
@MarekSowikowski 4 жыл бұрын
After near 30 minutes of video there was no info about creating package. I am looking for concise information, not poem.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
I explain this at the beginning of my newer videos but I provide real-world context, not just bite-sized tutorials. The former allows you to get the context you need to understand when and how to use something in the real world. The latter gives you a nice demo that rarely works when you try to modify it in any way.
@MarekSowikowski
@MarekSowikowski 4 жыл бұрын
@@IAmTimCorey YT is not a good place to present regular lectures, that can be treated as main source of knowledge. There is no organize such teaching tools. Playlists are too primitive. I am looking for short materials with concrete subjects because I have context in my mind. It is a waste of time such long materials for me.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Then this definitely isn’t the channel for you.
@MarekSowikowski
@MarekSowikowski 4 жыл бұрын
@@IAmTimCorey Beeing a child I have been listening to my granny's stories. Long and not so true. Now I am looking for compact and honest information.
@torrvic1156
@torrvic1156 11 ай бұрын
@@MarekSowikowski who said that YT is not a place for lectures? There is no line in the rules of YT saying that this is not a place for lectures. Many people are enjoying Tim’s content (including me) and you sound like a very arrogant man without any point.
Intro to VSCode for C# Developers - From Installation to Debugging
49:30
C# Logging with Serilog and Seq - Structured Logging Made Easy
1:07:56
[柴犬ASMR]曼玉Manyu&小白Bai 毛发护理Spa asmr
01:00
是曼玉不是鳗鱼
Рет қаралды 51 МЛН
Cat story: from hate to love! 😻 #cat #cute #kitten
00:40
Stocat
Рет қаралды 15 МЛН
ПАРАЗИТОВ МНОГО, НО ОН ОДИН!❤❤❤
01:00
Chapitosiki
Рет қаралды 2,5 МЛН
Delegates in C# - A practical demonstration, including Action and Func
1:09:11
Host your .NET Core NuGet Packages in GitHub for free
13:52
TechyMaki
Рет қаралды 12 М.
10 C# Libraries To Save You Time And Energy
33:59
IAmTimCorey
Рет қаралды 203 М.
The standard library now has all you need for advanced routing in Go.
13:52
Intro to Unit Testing in C# using XUnit
1:42:09
IAmTimCorey
Рет қаралды 406 М.