You should check out all the stolen town names in Wisconsin. It's like it's so cold here, we're willing to kid ourselves about what our towns should be named.. Just to feel like we're not here. Lol.
I've been doing it the hard way this whole time, I literally made a CLI tool over the weekend and went the environmental variables route. Thanks for the info 👌
Hello, great video. To go further, I think, it might be interresting to talk about some nuget packages to managing properly arguments with documentation and '-h'/'--help'.
Well done as usual! I've never really thought about doing this, but I'm inspired now. Definitely going to look into any processes that I have at home and at work that I can wrap up this way! Thanks for the great content!
Always nice to know how this work, as i'm watching it i was thinking that a great video would be something similar to this one, but on how to publish libs to use in other dotnet projects
Actually most interested on your Windows Terminal (is Windows Terminal right?) setup. Is that a theme or a teak, looks really nice, have a personal preference on Git Bash cause it includes some cool unix-like commands and already setup some minimalistic way to track git changes but that look and feel really caught my attention 👀. PS: All roads lead to Rome.
You forgot to mention that .NET CLI tooling is a feature of .NET SDK, not .NET Runtime. This is important if you're planning to distribute .NET CLI tools to your non-developer coworkers. You'll be out of luck.
Is this the same as if I would add the path to the .exe file in the PATH environmental variable? I get that this is much faster and I won't have to "install" my app somewhere manually. I'm just curious what's happening behind the scene.
Do we have a way to store the tool on the cloud but privately, so we can get pre-compiled build and sync it from anywhere (f.e. personal laptop, office PC)? Currently, I use powershell core to do something like this, store in git private repo, and sync between personal laptop and office PC. Both leverages dotnet, but no compilation needed. Of course, it will be slower than pre-compiled build. But what I really like a most, its built-in autocomplete feature. Just define parameter and the shell will do the rest. In contrast with most CLI tool that I need to see help command any time I forget🤣
Async is used for ANY type of non-blocking IO. UI is only one of them. Networking IO such as file sysstem reading, API calls or DB calls, all benefit from await async due to non blocking IO properly cascading in your console app.
The logic between the two is different. is will always check whether the reference is null. == will use the equals operator which can be overloaded, meaning that == null can be changed to return something else even if the reference is null. Basically is and is not are safer
@@nickchapsas luckily for us Rider users, Rider displays overloaded operators in a different color so if you're using an external library that uses overloads you'll be able to tell right away if it will behave like you expect (I don't know if VS supports this aswell)
So the only issue with using .NET as a "CLI" is that you would have to have an entire CLR Virtual Machine installed on the target machine, OR you would have to do some AOT compilation but that produces huge binaries, there is also the option to bundle everything into a single folder (this includes the entire runtime) again all of these options are not good. For true CLIs it's better to stick to real native languages such as C/C++/Go/Rust (go isn't truly native because it has a GC runtime but for a building a CLI in most instances that will not be a problem)
I tried it. But it didn't work for my program because in my solution I have -reference- multiple projects. It is unclear to me how to add reference projects to the pack command. The feature to install globally is nice though. Edit: After some googling it seems that adding project references to the pack command is not trivial :(
I have no idea what the problem you're facing is. I never had a problem with packing a projec thtat has other referenced projects. Pack should take care of it
@@nickchapsas I get a similar error as this 1: NU1101: Unable to find package JOS.MyNugetPackage.Core. No packages exist with this id in source(s): Dotnet Roslyn, Local feed, Microsoft Visual Studio Offline Packages, nuget.org I googled: dotnet pack referenced projects And the first hits are a blog that describes the problems and a stackoverflow thread. Stackoverflow thread is: stackoverflow.com/questions/40396161/include-all-dependencies-using-dotnet-pack Blog with description is: josef.codes/dotnet-pack-include-referenced-projects/
@@nickchapsas I’m sure you did 😄 But I’m just kidding
2 роки тому
@@nickchapsas Speaking of key, it is packed within the CLI right? What would be the approach if we want to publish the CLI and let the user uses hi own key?
Fantastic video. I create cli tools for myself but have never installed them as a tool. Where do they install to? One of my tools needs config files. Update: I found it: ~\.dotnet\tools\.store\gtconfig\1.0.0\gtconfig\1.0.0\tools et7.0\any
Came to learn about .NET CLI tools, as a result, learnt that US has a city named Rome.
Most US states have a town named Rome.
There's 18 towns or cities named Rome in the United States. Not quite the majority, but yes, many states are home to a Rome.
And Paris, and London… there are a lot of dupes
You should check out all the stolen town names in Wisconsin. It's like it's so cold here, we're willing to kid ourselves about what our towns should be named.. Just to feel like we're not here. Lol.
This channel is so informative!
I've been doing it the hard way this whole time, I literally made a CLI tool over the weekend and went the environmental variables route. Thanks for the info 👌
Always delivering good content and straight to the point. Thanks man!
This was better than the Microsoft docs themself. Great video!
I love these videos! I only found you recently but I am already a big fan! Good content, always learning something new... amazing!
Hello, great video.
To go further, I think, it might be interresting to talk about some nuget packages to managing properly arguments with documentation and '-h'/'--help'.
Well done as usual! I've never really thought about doing this, but I'm inspired now. Definitely going to look into any processes that I have at home and at work that I can wrap up this way! Thanks for the great content!
Always nice to know how this work, as i'm watching it i was thinking that a great video would be something similar to this one, but on how to publish libs to use in other dotnet projects
Can you share what custom theme are you using for the Windows Terminal?
Great video, thanks! 👏This with Cocona and Refit, you don't need more
Actually most interested on your Windows Terminal (is Windows Terminal right?) setup. Is that a theme or a teak, looks really nice, have a personal preference on Git Bash cause it includes some cool unix-like commands and already setup some minimalistic way to track git changes but that look and feel really caught my attention 👀.
PS: All roads lead to Rome.
that's the first point where my seesight came - for me it's a Windows Terminal, but maybe some plugin or some custom tool?
@@Z4ch4r Scott Hanselman's blog shows how to configure the windows terminal with all that cool stuff.
@@mobiletonster will find it out, thank you.
So clear & concise. You're the man.
hell yeah, the first .Net app I made on my own was a minimal htop for Windows, and this is exactly what would make it so much more usable :D
Realy cool! Awesome content!
imagine that the robbers rush in and you slowly type "defence system on"
Surprised this video hasn't ended up being a "stealth" announcement for NickSharper's public release... :D
Thanks!
Nick, this is awesome, as usual.
Short but very good!
You forgot to mention that .NET CLI tooling is a feature of .NET SDK, not .NET Runtime. This is important if you're planning to distribute .NET CLI tools to your non-developer coworkers. You'll be out of luck.
Great tutorial! How do you get your Windows Terminal look?
Install oh-my-posh
Is this the same as if I would add the path to the .exe file in the PATH environmental variable? I get that this is much faster and I won't have to "install" my app somewhere manually. I'm just curious what's happening behind the scene.
Awesome as always.
"What?! the US has a Rome?" 😂
Great video as always.
Another great video! But ummmm... goto?
Let's not talk about that
@@nickchapsas Ha ha and here I was hoping for a future "Valid uses for goto and why you should use it" video!!
When will be the .NET api microservices with Azure course will be out?
What theme are you using for oh-my-posh?
What a surprise - cool video again )
Thanks Nick
How is this different from creating a console app? Is CLI a project type?
Nice! That's awesome video.
Thanks for sharing !
Does anyone know how I can get those beautiful icons showing in the terminal on visual studio terminal ?
oh my posh for powershell
ua-cam.com/video/VT2L1SXFq9U/v-deo.html here you are
6:32 US also have a Denmark. Infact it has 15. Australia has 1 too.
The real surprise was the "goto" command I saw buried in the code, but I assume this is a side effect of using minimal API?
It's a side effect of me being lazy
@@nickchapsas You crack me up man. Have a great Christmas, I look forward to more content from you next year!
@@alexclark6777 Happy holidays!
What IDE are you using?
01:00 Clever clue to show a video on Tye is comming shortly 😎
Hehe, yeah it was shot before the cli one. In fact it’s what gave me the idea to make this video
I was expecting that last line to do something like `end video`
hey nick nice video as usual, what is the theme that u are using on power shell?
ua-cam.com/video/VT2L1SXFq9U/v-deo.html here you are.
@@nguyenxuanquang9864 thank you!
Nice video :D Which terminal do you use?
Windows Terminal with oh-my-posh installed
There is a Rome, New York. Probably many others. :)
Curios on how the lights on and off works from cli
Hey Nick! Why the framework selector is disabled 1:45 and how to enable it? I really suffer from this ((
Do we have a way to store the tool on the cloud but privately, so we can get pre-compiled build and sync it from anywhere (f.e. personal laptop, office PC)? Currently, I use powershell core to do something like this, store in git private repo, and sync between personal laptop and office PC. Both leverages dotnet, but no compilation needed. Of course, it will be slower than pre-compiled build. But what I really like a most, its built-in autocomplete feature. Just define parameter and the shell will do the rest. In contrast with most CLI tool that I need to see help command any time I forget🤣
You can host a nuget repository yourself if you want.
@@pilotboba unfortunately, that's a bit complicated, compared to my current solution
so great!
I'm pretty interested in how to take this and use it in Linux, especially as a local (individual user) install.
You can use exactly what you see here in linux as it is
Glad you're supporting open-source stuff and using GNU/Linux :D
Hi, when can We expect part two?
Nice terminal. Were you inspired by Scott?
Yep
There are a number of "Rome" in the USA ;) Just like many other European city names ;)
Yeah Rome GA
How dare you diss the weather in London.🤣
Hey I’ve been living here for the past 10 years. I love it but it’s as stereotypical as it gets
Hi. What shell is that that shows all the colorful things at the beginning of the line?
It’s windows terminal with oh-my-posh installed
So if you want to get the weather in Hell, do you get the weather in Hell Wyoming?
Cool!
There are 18 towns or cities named Rome in the United States, and 25 of them in total throughout the world.
Why not compiling the program and copy paste the resulting .exe into system32?
Hi Nick I have a question what is the name of the extension you use to display the paths in the CLI like that?
oh-my-posh
This is how to create something similar: www.hanselman.com/blog/my-ultimate-powershell-prompt-with-oh-my-posh-and-the-windows-terminal
Thanks 🙏
What terminal is this that you are using Nick?
It's Windows Terminal with oh-my-posh
Rome is the largest city in and the county seat of Floyd County, Georgia, United States.
What is the terminal you are using?
Windows Terminal with oh-my-posh
@@nickchapsas windows terminal with powershell ?
@@stigmag You can use most any shell in windows terminal, cmd, powershell, pwsh,, bash, etc.
What is the benefit of using async in a console app? as it's no like a general UI app where you show loading bars while waiting on the task.
Async is used for ANY type of non-blocking IO. UI is only one of them. Networking IO such as file sysstem reading, API calls or DB calls, all benefit from await async due to non blocking IO properly cascading in your console app.
All my tooling as a Unity developer is made with node.js. Same principle. Makes life way easier for us, lazy developers!
Tool command name can be an emoji.
Just putting that out there.
Rome, Georgia, USA is not too far from me
They should burn goto statements... a quick way for spegetti code
Is there any benefit to use if city == null vs if city is null?
Currently no benefits. stackoverflow.com/questions/40676426/what-is-the-difference-between-x-is-null-and-x-null
The logic between the two is different. is will always check whether the reference is null. == will use the equals operator which can be overloaded, meaning that == null can be changed to return something else even if the reference is null. Basically is and is not are safer
@@nickchapsas luckily for us Rider users, Rider displays overloaded operators in a different color so if you're using an external library that uses overloads you'll be able to tell right away if it will behave like you expect (I don't know if VS supports this aswell)
@@nickchapsas Thank you!
Ok, is that an zsh terminal ?
That's Windows Terminal running Powershell with oh-my-posh
So the only issue with using .NET as a "CLI" is that you would have to have an entire CLR Virtual Machine installed on the target machine, OR you would have to do some AOT compilation but that produces huge binaries, there is also the option to bundle everything into a single folder (this includes the entire runtime) again all of these options are not good.
For true CLIs it's better to stick to real native languages such as C/C++/Go/Rust (go isn't truly native because it has a GC runtime but for a building a CLI in most instances that will not be a problem)
Which Terminal extension is that?
oh-my-posh
I tried it. But it didn't work for my program because in my solution I have -reference- multiple projects. It is unclear to me how to add reference projects to the pack command.
The feature to install globally is nice though.
Edit: After some googling it seems that adding project references to the pack command is not trivial :(
I have no idea what the problem you're facing is. I never had a problem with packing a projec thtat has other referenced projects. Pack should take care of it
@@nickchapsas I get a similar error as this 1:
NU1101: Unable to find package JOS.MyNugetPackage.Core. No packages exist with this id in source(s): Dotnet Roslyn, Local feed, Microsoft Visual Studio Offline Packages, nuget.org
I googled: dotnet pack referenced projects
And the first hits are a blog that describes the problems and a stackoverflow thread.
Stackoverflow thread is: stackoverflow.com/questions/40396161/include-all-dependencies-using-dotnet-pack
Blog with description is: josef.codes/dotnet-pack-include-referenced-projects/
US has multiple cities named Rome lol. New York and Georgia
what console configuration is that?
oh-my-posh
It thought you wanted weather for Rome, Georgia. 💀
Plot twist: Nick doesnt actually dispose api keys and just hopes we believe him
Not gonna lie, I disposed it 10 minutes before the video went live
@@nickchapsas I’m sure you did 😄 But I’m just kidding
@@nickchapsas Speaking of key, it is packed within the CLI right? What would be the approach if we want to publish the CLI and let the user uses hi own key?
The us have even Carthage ! xD
👍🏽
Did I just see a label and a goto !!?? 😂
Let's not talk about that part 😂
Anyone knows what Terminal is he using?
I do! oh-my-posh
@@nickchapsas Thanks!
Total War: ROME 2 (US-Version)
Where is my tinfoil hat ... i was researching this yesterday.
make the video about how to customize power shell
Herr you are ua-cam.com/video/VT2L1SXFq9U/v-deo.html
in this video we really learned that the US has a city called Rome. 😏
do US has a Rome........ anyway.... :D
Rome, Georgia, United States.
Fantastic video. I create cli tools for myself but have never installed them as a tool. Where do they install to? One of my tools needs config files.
Update: I found it: ~\.dotnet\tools\.store\gtconfig\1.0.0\gtconfig\1.0.0\tools
et7.0\any