DEV Community

Mariusz Bialobrzeski
Mariusz Bialobrzeski

Posted on

.Net Dojo Setup

There are times when we need to learn something in .Net. We search whatever it might be on Google, check different Stack Overflow solutions, go through blog posts that offer complete code examples. Finally, after all the reading we decide which concept to adapt and go to sleep having this great feeling of Wow I have learnt something cool today. And that is great. What is not so great is that:

  • one
    The next day I do not really remember well what I read a day before, and, what is more more important,

  • two
    I would not be able to write the code to fully use what I have learnt.

What I found to be quite effective though is practice. I usually do not feel that I really learnt something until I do it. One of the big challenges that I know prevented me from putting the new concept into action however was the time and effort necessary to spin off a dojo project where I could actually put the knowledge into code.
That is where .Net CLI comes to play. All you need to do is start the PowerShell terminal by pressing Win key and start typing powershell until you see PowerShell displayed in the results below and press Enter. In the PowerShell terminal window navigate to the folder where you would like to keep your work. Then use the dotnet new command to create an empty dojo project.

dotnet new console -n MyProjectName -o MyProjectFolder
Enter fullscreen mode Exit fullscreen mode

Before actually creating the new project I usually like to check the outcome with the --dry-run argument such as

dotnet new console -n MyProjectName -o MyProjectFolder --dry-run
Enter fullscreen mode Exit fullscreen mode

Console application template is just one of many empty projects available to us. Choose whatever template is most suitable for your needs.
After that, all you need to do is navigate to the project folder

cd MyProjectFolder
Enter fullscreen mode Exit fullscreen mode

and start Visual Studio Code by typing

code .
Enter fullscreen mode Exit fullscreen mode

And that is it. You are ready to put your new knowledge into action.

Top comments (0)