C# Creating NuGet Package for .Net Framework Project

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so in this video we're going to talk about making a nougat package for a dotnet framework project instead of a dotnet core in case you're not up to dotnet core yet and you know you want to stop publish nougat packages so person is literally going to make a class framework class I'll have before the dotnet framework so there's gonna be nothing in it the point of it isn't the code so we'll just get this project and make sure it builds successfully which it does and now let's say this is your project that you want to submit to nougat so you're gonna new the package first thing you want to do really is open the assembly info or right-clicking your properties and assembly in fopen it's the same kind of details whichever way you want to do it you want to set up in here your title description so my test nougat and then you've got your class library this this would be my product name then company so company we've got one and then the assembly product so again that's a B in this case my test product copyrights in there and then that's about it and then your version here so that kind of the the key bits of info to shut up if you then look in properties assembly and throw your also seats it's basically filled out there so that's all your details setup obviously when you're publishing to nougat you want to be in release now when you're using the old nougat it doesn't pick up this set in oz it's going to look at is if you right-click on your projects and unload right-click again and add it it's gonna pick up on what is this default configuration here so that the property configuration if it's blank meaning there isn't one which there won't be one you run new bit it's gonna try and do debug so we'll change this bit here to release and then we load the project and all that means is when we come to run the nougat executable on it it will pick release instead of debug which is you know important you don't want deepak then in order to now push this project we can open the folder and here's the folder that we want to push this is our you know project so we then open up the internet go to new gets dog versus downloads download new GUI XE and save it then if we paste the download into here so we've got the executable here we're good with that now we want to open up a command line here so type CMD so you're in the same folder as the CS proj of your solution and nougats in here so we can run move it and the one thing you have to do once or when there's any I guess major changes to your CS prod structure you time nougats back and then the name of the CS proj and press enter and this will now create this new spec open this up in I'm gonna open it up in visuals with your code and you'll be presented with this generated file so the ID the version all these dollars all this is going to pull in from your actual CS proj the things that won't is these three here or these four here the copyright and the tags aren't being pulled in so the tags are searchable terms so you're going to push it to nougat and you want it to be found by gonna SQL magic or from doing any foot types SQL magic and then you put your own company your name and your project name as kind of tags so the only thing you really want to change is the license so if you have a license if not just remove it in this case we don't project tail could be the github repo so like you know get whole contours not the angel steps forward slash then out SolidWorks API or something say with the icon we don't have one don't have a license to accept and then a summary of the release notes for this version so this could be my first test version and then we save the file so that's now your new spec edited and the only time you really need to edit this is if you come to do a new release and you want to change the release notes you go into here and change the release notes or you want to add some new tags or change that but pretty much all the time the I'm thinking in a change of release notes so that's a one time thing when you do new spec and it's all it does is generate this file so you could hand type it if you wanted that's not really an issue so then we have the project already set as default to release and that we did a minute ago so now all that's left is to compile this project in release so we're now ready let's compile them good to go and then in here we just do yoga pack and this should attempt to package you can see here based on their packing files from release which is the important step there and successfully generated package so now we have a package here that's ready to push so it's as easy as that basically and now we can push that package off to new org so in the previous video I showed you how to create an account on nougat and then how to sign in and go to your API keys and generate one which I won't show obviously on the video so that you you know you can't see my key you could manually upload a package or you can push it from command line so I've got the published packets here from you know my according to packages basically so I could push one of these to like but I don't really want to to do that so instead I'll simply show you how to push II live so you've seen the last video on nougat packages it will be linked in the description of not that kind of goes through in more detail about creating the new get package getting it API key and also what happens once you push so I don't need to read repeat those steps if you will so then the only thing left now is to actually push the packet live so we've got the nougat in this folder and it's next to the new pack so what we can tap in here the basically new gift push then the name of the nuba package which is this one then your API key so that would be a bunch of you know random numbers like this and then - sauce and then HTTP colon forward slash API bubut knew we've got org for /p three four slash index dot jason and we press enter on this not fail because my keys wrong but it will attempt to push it will then get the packet and it's same forbidden basically the remote access denied the keys invalid so other than now specifying your correct key here and pressing enter this will then push up live and say successful and if you want to see that actually happened you can check out the you know the other video i did that's the only real difference between the two so in a dotnet one Usenet nougat push and if you using a you know the old-style then you do the actual nuit exe you download and instead you do nougat push and then the syntax is ever so slightly different is - sauce instead of - s you know there's very little difference between the two that would then obviously push off live - here you'd see in here instantly new account and then it would say you know this this package isn't currently indexed and then after there is your very first time pushing a new project then it will take potentially 20 minutes half an hour if it's a repeat one it simply updated it typically takes five to ten minutes to to appear live and be indexed so that's all there is to actually generating and pushing a nougat again say you want then create the next version then you would go to assembly info and you would change the version to say we're at version 1.1 now you change these two here nothing else really change it about that we then build the release and we'd open a command line again and we just say nougat pack oops did that one offer off-camera there so you do nougat pack and you can see it's generated there the next package so that's picked up on the the next package and then you do the same again you do new push to push it live so what you can do is you can all always make a tax file called say generate package and they say dot bat and then that could just be open with vs code and this could let you say new the pack as simple as that and if we were to leave those to use double click generate package and there was bring this onto screen see that opens and generates your package and they could also make one that's called say push package and what you could do is generate a package which generates the packet and then you could drag this onto the push package and then in here it would appear as an argument and you could then type in your new Gert Porsche the package name could be the variable which I I can't remember the bat very ball can do a quick Google bot there's a variable you can pull in something like dollar one or percentage one that's the the arguments when you drag and drop a file on in fact let's just do a quick Google on that and find that out so it's man line but you get argument o'keefe again I'm doing this off my second monitor with a minute so let's just take a quick look as something like percent each one I was right in the first place percentage one so I'm pretty sure if we were to just do percent e1 and then we just started and say echo 71 and save that and we were to that's probably going to appear and close straightaway over to drug that on yeah it's a peer and close straightaway so it's just open with that and I think we can do pause I think we'll do it yes they'll stay open so if I drag and drop that on now package and bring this up you can see it has output the the path so we have the full path there so what we should be able to do with that is to then change this to basically be nougat Porsche and then that and you might want to wrap that in quotes in case the spaces in the name and then you can do the key and then - source HTTP API nougat or forward slash what was it now four or five from v3 four slash index I think it was not really monitoring for this but next up Jason I believe I'm you just double-check a file with that in where are we drag this off a minute just get Mary or v3 yeah that was right so we now have this in so we were to drag and drop this on one of the keys wrong or what we should get is there we go and let's just put a pause back at the end just so we can see it pause so now if we drag and drop onto this and I drug it into view you can see it then starts to try and push the latest packet that we drop on so you could have a little script like this and then all you have to do is double click generate to generate the current package and it would generate the nougat and then you just drag and drop that on to push which would be I guess yes called push and you get the output to be pushed so that's that's one way you can do kind of a nice little setup there so that's like so that's all there is to generating a packet for a dotnet framework project instead of a dotnet core very little difference but at the same time it's also important to know how to do that because there are key differences so hopefully this video was useful if you want to support what I'm doing I do have a patreon page patreon.com/lenguin as always you can leave comments and I'll get back to you in the video and also I've just started to move to a new recording software so you should now see you've got 60 frames per second on this video so the mouth should be smoother than the last videos if you're using a 60 frame a second video and I'm gonna try and you know improve the quality of these videos to get 4k in 60 frames per second so if you enjoy that you know let me know hopefully it's appreciated and I'll see you next time [Music]
Info
Channel: AngelSix
Views: 17,033
Rating: undefined out of 5
Keywords: c#, nuget, package, .net, framework, tutorial, guide, angelsix
Id: xPm9FsptuE8
Channel Id: undefined
Length: 13min 58sec (838 seconds)
Published: Thu May 03 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.