DEV Community

Cover image for 10 commands you don't want to be without in .Net Core

10 commands you don't want to be without in .Net Core

Chris Noring on September 21, 2019

Follow me on Twitter, happy to take your suggestions on topics or improvements /Chris TLDR; this is an article describing 10 great commands in .Ne...
Collapse
 
vit100 profile image
Vitaliy Markitanov • Edited

Speed is reason to do CLI?
Well, first of all CLI is good for DevOps and scripting.
.Net developers work in IDE and no reason to use CLI. How often in your project life you do 'dotnet new'? Once.

So difference in 5sec between CLI and ide is nothing..
Similar idea with other commands..

Collapse
 
madmathmike profile image
MadMathMike

Speed is ONE of the reasons to know and use the dotnet CLI. And 5 seconds on a repeatedly executed command (e.g., build or test) definitely improves the developer experience.

Collapse
 
metz20001 profile image
metz2000 • Edited

Build and test have keyboard shortcuts. Package restore is automatic. Why would I type on command line instead of using an IDE? Just remembered, VS can run tests automatically after build 😃

Thread Thread
 
madmathmike profile image
MadMathMike

Personally, I only use the CLI on a day-to-day basis because it provides me with a better development experience (e.g., speed of the commands executed, flexibility in IDE choice, etc.). So if you're very happy with your dev experience, keep rocking on. :-)

However, using the CLI directly improves your knowledge of it, which is irreplaceable if you need to manage the CI/CD pipeline of your application. Setting up some of my first automated builds in TeamCity was difficult for me because I didn't know how Visual Studio was working with command line tools (like 'MSBuild') "under the covers".

Collapse
 
softchris profile image
Chris Noring

well.. back in the day Visual Studio wasn't as fast as it is now.. Yes definitely scripting is a good reason I should have mentioned :) .Net Core developers are a diverse bunch of people. The one on Windows tends to be on Visual Studio. The ones on Mac/Linux (myself included) more sways towards VS Code and other IDEs according to my findings (the not very scientific Twitter polls ;) ). Also you do dotnet new once per project, depends on how many projects you have I guess. Anyway appreciate your perspective Vitaliy

Collapse
 
jeastham1993 profile image
James Eastham

Just to add to this, I'm a Windows user with both full VS and VS code on my laptop. VS code and CLI for the win every day of the week! Full visual studio feels really cumbersome

Thread Thread
 
softchris profile image
Chris Noring

I can understand that feeling

Collapse
 
joshuatz profile image
Joshua Tzucker

Good list. As someone currently learning some .NET and coming from the standard web-dev world, I would add: dotnet watch run. Basically hot-reloading when you save changes from source (with some caveats).

It is now baked into .NET core SDK, although if you are developing your frontend in .NET too and want synchronized browser reloading, you'll also need something like Browser-Sync (guide here)