Intro To The .NET CLI - How To Use It, Why We Need It, And More

Поділитися
Вставка
  • Опубліковано 17 кві 2022
  • .NET has a set of command-line tools that are excellent. You can create, update, build, and publish an application all from the command line, and that is just scratching the surface of what it can do. In this video, we are going to look at how to use the command line as well as why it exists and when we would take advantage of it.
    Full Training Courses: IAmTimCorey.com
    Source Code: leadmagnets.app/?Resource=Int...
    Mailing List: signup.iamtimcorey.com/
    .NET SDK Downloads: dotnet.microsoft.com/en-us/do...
    Runtime Identifier Catalog: docs.microsoft.com/en-us/dotn...

КОМЕНТАРІ • 119

  • @raianmr2843
    @raianmr2843 2 роки тому +16

    I absolutely love your approach to teaching. It's not just that your videos are in-depth, the amount of effort you put into picking topics to cover that are actually helpful is also very admirable.

  • @haxguy0
    @haxguy0 2 роки тому +3

    Wow this was amazing! I was looking for content on this topic for hours. Clear, to the point, detailed. I'll definitely look up your courses. Thank you

  • @pierreplourde
    @pierreplourde 2 роки тому +7

    This is very cool! Too many people discount CLI because it seems complicated or seems to require esoteric knowledge/memorization, but as someone who grew up in the era of the Commodore VIC-20, I appreciate how much closer to the machine the CLI can put me.

  • @stepbackandthink
    @stepbackandthink Рік тому +1

    I've looked at training videos from several sources recently and you are easily the best coach by some distance.

  • @Fred_Edx
    @Fred_Edx Рік тому +1

    This is absolutely wonderful. To find something like this that makes development easier.

  • @Indasaid
    @Indasaid 2 роки тому

    Excellent video Tim, Thanks! Showed me exactly what I needed 👍🏼

  • @claudiocespon4128
    @claudiocespon4128 2 роки тому

    Excellent as always! Thanks a lot Tim!

  • @Slider1604
    @Slider1604 Рік тому

    Excellent Video! Thanks. Just in time. I'm about to get serious about the dotnet CLI. Thank you.

  • @OnlyBESTClub
    @OnlyBESTClub 2 роки тому

    I've the courage to open solution and project files now. Thank you!

  • @guillermodanielmazzarigiov1768
    @guillermodanielmazzarigiov1768 2 роки тому

    Thanks bro! Awesome one! Extremely useful, at least for me

  • @jayadeshchristo2345
    @jayadeshchristo2345 Рік тому

    Loved this . Will watch more of your videos ...

  • @programmingmadeclear
    @programmingmadeclear 2 роки тому

    Another great video from great Tim 👌

  • @user-ce8lo9ir6t
    @user-ce8lo9ir6t 2 роки тому

    Your Content is always top notch man!!

    • @IAmTimCorey
      @IAmTimCorey  2 роки тому

      Thanks!

    • @user-ce8lo9ir6t
      @user-ce8lo9ir6t 2 роки тому +1

      @@IAmTimCorey I was joking 😃😃... Sorry just kidding....your content really is top

  • @willian-rattis
    @willian-rattis 2 роки тому

    Amazing, I was able to understand your English perfectly, it's an amazing class, tks 🇧🇷

  • @pwnuser2940
    @pwnuser2940 2 роки тому +2

    Hello, Tim.
    I appreciate you for all the tutorials you did and for sharing knowledge with us, I learned a lot from you, even more than what the university teaches me.
    Could you make in the near future, a video about how we can find the solution to certain tasks/problems? By what set of steps should I think about the solution? I often copy code from several places and manage to do what I propose, or either follow tutorials that implement the feature, but I would like and it would help me to think by myself and come up with my own solutions.
    Thanks a lot!

    • @IAmTimCorey
      @IAmTimCorey  2 роки тому

      A lot of that comes from practice. The more you practice planning, the better you will become at it.

    • @mattongbp
      @mattongbp 2 роки тому

      lol...University are KILLERS of innovation. Robots maker.

  • @uppercat7268
    @uppercat7268 2 роки тому

    Great video as always.

  • @RubenALopes
    @RubenALopes Рік тому

    This is really helpful! Thanks Tim

  • @alejandromachacanavia8036
    @alejandromachacanavia8036 Рік тому

    Really interesting, thank you!

  • @quince10
    @quince10 Рік тому

    Thank you! So helpful!!

  • @martyna9001
    @martyna9001 Рік тому

    I really enjoyed your explanation thank you !

  • @sakalansnow6579
    @sakalansnow6579 2 роки тому

    Amazing job 👍

  • @banisan2035
    @banisan2035 Рік тому

    Thank you my friend. Your videos are lovely. c:

  • @michelchaghoury9629
    @michelchaghoury9629 2 роки тому +6

    Great content will you be making vids about microservices and testing, you already did and covered about testing but i would like to see how e2e and specflow testing is done

    • @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/

    • @aniljha6106
      @aniljha6106 2 роки тому

      I have already added microservices in suggestions site . Still waiting for the video

  • @billcarpenter5615
    @billcarpenter5615 7 місяців тому

    Thanks so much for this video, I have been wanting to get vs code working to create programs on a linux box and this helped me get that working.

  • @andergarcia1115
    @andergarcia1115 8 місяців тому

    Master, you have become an idol for me

    • @IAmTimCorey
      @IAmTimCorey  8 місяців тому

      I'm glad you find the content helpful.

  • @shivaakrish
    @shivaakrish 2 роки тому

    awesome tutorial. thank you.

  • @VivekGawande1
    @VivekGawande1 Місяць тому

    It would have been great if you also covered configaration and launchsettings. Great video!

    • @IAmTimCorey
      @IAmTimCorey  21 день тому

      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/

  • @michaelparker6907
    @michaelparker6907 7 місяців тому

    This clears up a lot of territory. Much to build on here.

    • @IAmTimCorey
      @IAmTimCorey  7 місяців тому

      I am glad it was helpful.

  • @adamsmith2357
    @adamsmith2357 2 роки тому +1

    excellent video

  • @axmart1993
    @axmart1993 2 роки тому

    Can't wait for the raspbery pi video, i thinking about buying one for a long time.

  • @oskarisulkakoski3677
    @oskarisulkakoski3677 5 місяців тому

    Thank you!

  • @simon-white
    @simon-white Рік тому

    Great overview video Tim, makes it easy to pick up. Had an explore and found you can run everything from the sln folder (C:\temp\CliDemo) as long as you specify the project paths (don't even need the whole path, just the folder name)
    e.g. dotnet add DemoLib package Dapper; dotnet add DemoApp reference DemoLib; dotnet run --project DemoApp; dotnet publish DemoApp -p:PublishSingleFile=true etc.

    • @IAmTimCorey
      @IAmTimCorey  Рік тому

      Yep, it just takes more typing.

    • @simon-white
      @simon-white Рік тому

      @@IAmTimCorey it's not so bad with tab completion for the paths but I agree for interactive use. I think it makes most sense for scripting. Personal preference I guess, I'd rather a script not need to depend on changing directory from its starting point.

  • @mashpayne
    @mashpayne Рік тому

    Thanks Cory, it was really helpful. You can tell a video tutorial is useful when you don't get bored or feeling lost. Great video.
    I am trying to use CLI to publish MAUI app (android/iOS/windows). Do you know know tutorial for that?

  • @pylvr8021
    @pylvr8021 2 роки тому

    Great as always thanks you sir :) quick question any plans for graphql tutorial ?

    • @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/

  • @00wiking
    @00wiking 2 роки тому

    On Linux I use cli all the time but always nice to watch and maybe learn something new :)

  • @TheBausahab
    @TheBausahab 2 роки тому

    thank you sir...

  • @narendrababu176
    @narendrababu176 2 роки тому

    Nice to know this concept. Thanks Tim.
    Also, your content, explanation is superb. Could you please make sure the text will be clearly visible. It is shady and blur, not clear to note down the points quickly...

    • @IAmTimCorey
      @IAmTimCorey  2 роки тому

      I would recommend checking your video playback settings. This was recorded in 1080p, and the text is crisp and clear.

  • @kurthill4
    @kurthill4 Рік тому

    Hi Tim -- your videos are awesome, thanks so much for publishing these! Quick question - I have followed along in this video and everything seems to work, but when I do the publish to a single file step, I get mostly the same output you get, however I get an error that says "publishing to a single file is only supported for executable apps" when it is chewing on DemoLib. It does not spit up an error for DemoApp. The resulting app seems to work fine... I am curious as to why you do not get that error in your video?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому

      You don't publish the class library. Only UI projects can be published this way.

  • @civilsavant6072
    @civilsavant6072 Рік тому +1

    Thanks for this great video. I wasn't able to get this to work, maybe you can help me understand why? I am trying to learn the Stride game engine (C# based). The only way they give you to create a release build is through VS, which I can't run, so I am trying to do it from command prompt. I have changed directory to where the .sln file is and tried to use dotnet build/build -c Release/publish(not wirtten this way, it was written out properly in command prompt for each type). It keeps saying " Unable to find a project to restore!", but then immediately afterward it prints the path and name of the the .sln file. No builds have been created. Do you know how to make this work?

    • @civilsavant6072
      @civilsavant6072 Рік тому

      The exact commands I entered were these:
      dotnet build
      dotnet build -c Release
      dotnet publish -p:PublishSingleFile=true -r win-x64 --self-contained true

  • @kakhatezelashvili3368
    @kakhatezelashvili3368 Рік тому

    Thanks for the great video. But I am a little confused, what is the difference between dotnet build and dotnet publish commands ?
    Since we can also grab the output of the dotnet build command and put it somewhere ?
    Also I see that after running dotnet publish command, we see the same exact output as build command produces ?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому

      This answer will help: stackoverflow.com/a/55959286/733798
      Basically, publish actually prepares your application to move. Build doesn't, so while it can sometimes work, it won't always.

  • @laszloszoke18
    @laszloszoke18 Рік тому

    What I learned from this video is that before every command, you have to enter a 'cls' command.

  • @darrendickerson512
    @darrendickerson512 15 днів тому

    Hi Tim, Hope you are well! When I do dotnet run on a rest api project I get a "ctrl-x" to end even if I just run the app from the prompt. I'm on macos btw. Where do I go to find info on how to get around that in a cicd jenkins pipeline. I have some postman newman test I want to run. Thanks, Darren

    • @darrendickerson512
      @darrendickerson512 14 днів тому

      So it is just "dotnet run > /dev/null &" on a mac... lol

  • @user-nj7of5yi4b
    @user-nj7of5yi4b 7 місяців тому

    thanks

  • @ramanareddybuchepalli6844
    @ramanareddybuchepalli6844 2 роки тому

    Hi @IAmTimCorey,how we can figure out which build tool used Ms build or .net cli to build .csproj

  • @hwd1978
    @hwd1978 Рік тому

    Thank you Tim. How to add an item (C# class) into the C# project?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому +1

      Just put it in the folder where the csproj file is or in a subfolder of that main folder. That's it.

    • @hwd1978
      @hwd1978 Рік тому

      @@IAmTimCorey Thank you!

  • @Patrick-cu5kb
    @Patrick-cu5kb Рік тому

    Can you make another video using the mvc project and watch mode that comes with?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому +1

      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/

  • @jacool5168
    @jacool5168 2 роки тому

    Hi Tim. I have problem with one commend on Linux:
    dotnet publish -p:PublishSingleFile=true -r linux-x64 -self-contained true
    I get :
    MSBuild: error MSB1008: Only one project can be specifed

    • @IAmTimCorey
      @IAmTimCorey  2 роки тому

      Are you running this in the directory of your project? It won’t work if it is the solution directory or if there are multiple projects in the directory.

    • @jacool5168
      @jacool5168 2 роки тому

      @@IAmTimCorey I am running on linux in VirtualBox, on windows evrything is allright. I have one project.

  • @PavanKumar-su1on
    @PavanKumar-su1on 2 роки тому

    I was trying use google calendar API to create a google meet link, i was not able do so, can you please suggest a place to look or any link proceed further, i searched stackoverflow like 1000 times, thank you

    • @IAmTimCorey
      @IAmTimCorey  2 роки тому

      Sorry, I don’t have an example to show you.

    • @PavanKumar-su1on
      @PavanKumar-su1on 2 роки тому

      @@IAmTimCorey if possible can you suggest anything

  • @humahuma5969
    @humahuma5969 2 роки тому

    Cool

  • @DuelingTreeMike
    @DuelingTreeMike 2 роки тому

    Another good video! Is there a way to dotnet new that does not create Class1.cs? (I wish Microsoft would stop creating Class1 ! Lol)

    • @IAmTimCorey
      @IAmTimCorey  2 роки тому +1

      No, because if it doesn't create a class then you cannot immediately add the library as a reference since there is nothing in the namespace. It is essentially a work-around. But I agree it is annoying.

    • @DuelingTreeMike
      @DuelingTreeMike 2 роки тому

      @@IAmTimCorey Thanks Tim! I guess I could delete it as a part of a script. I am a huge advocate for automation. I would love an opportunity to go through an automation approach between database project, local DB publish, and “dotnet scaffold”. I stumbled upon a beautiful approach that makes it so easy to keep a database, its project, and the application models all in sync. I know your preference is dapper over the entity framework, and that’s not here nor there really, but for the EF and db-first folks out there, a few may experience nirvana. Lol. I would love an opportunity to discuss with you about this and dev in general.

  • @S3Kglitches
    @S3Kglitches 2 роки тому

    Could you show how to debug using .pdb on a published .exe? I always wondered what is the file for and now I know but still I can't imageine how to use it.

    • @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/

  • @ramanareddybuchepalli6844
    @ramanareddybuchepalli6844 2 роки тому

    When we can use Ms build when we can use dotnet cli commands

  • @christophem6373
    @christophem6373 2 роки тому +2

    Could you chapterize please ?

    • @IAmTimCorey
      @IAmTimCorey  2 роки тому +2

      Chapters come from my viewers. I don't have the time to go back through and add chapters, but if a viewer wants to contribute chapters in the comments, I will add them to the description.

  • @jacool5168
    @jacool5168 2 роки тому

    But anyway U are great!

  • @user-yw4ml4sm3f
    @user-yw4ml4sm3f 2 роки тому

    tết năm nay nghèo quá không có tiền

    • @IAmTimCorey
      @IAmTimCorey  2 роки тому

      That's why there is so many free videos here on UA-cam - not everyone can pay for content. I work hard to ensure that my paid content funds more free content. That way, everyone can benefit.

  • @kenanthompsonkilledmydog4753
    @kenanthompsonkilledmydog4753 2 місяці тому

    Awesome tutorial 👍

  • @musabalriani550
    @musabalriani550 Рік тому

    Thank you Tim ,you saved alot of Time ⏱👍👋