Skip to content

WebNinjaDeveloper.com

Programming Tutorials




Menu
  • Home
  • Youtube Channel
  • Official Blog
  • Nearby Places Finder
  • Direction Route Finder
  • Distance & Time Calculator
Menu

How to Setup & Running C# Program in Visual Studio Code Full Setup Tutorial For Beginners

Posted on November 3, 2022

 

 

 

Welcome folks today in this blog post we will be looking on how to setup c# in visual studio code and running the first program. All the steps of this tutorial is shown below.

 

 

 

Get Started

 

 

 

In order to get started you need to download the .NET 6 Framework or SDK on windows machine so that we can create C# programs in command line

 

 

DOWNLOAD .NET 6 FRAMEWORK SDK HERE

 

 

And after downloading this sdk simply follow the instructions to install this sdk in the windows machine as shown below

 

 

 

 

 

 

After installation is complete you will get this above window. Simply now open the command line to cross check if the installation has taken place successfully or not as shown below

 

 

 

 

As you can see we have written the below command

 

 

dotnet

 

 

The command is successful. Now we have successfully installed the .NET 6 SDK So now we just need to setup C# environment for visual studio code as shown below

 

 

Setting up C# in Visual Studio Code

 

 

Now for the setup you need to install the below visual studio code extensions which are shown below.

 

 

 

 

 

 

 

 

All these are C# Specific extensions for working smoothly in writing the c# programs and running them. Now we need to execute the below command to initialize a new C# Project

 

 

First of all inside the visual studio code you need to open a new terminal as shown below

 

 

 

 

And then we need to execute the below command as shown below

 

 

dotnet new console

 

 

This will create a new c# project in the root directory as shown below

 

 

 

 

 

 

Now to run this Program.cs c# hello world program on the console you need to execute the below command which is shown beloww

 

 

dotnet run

 

 

Recent Posts

  • Android Java Project to Crop,Scale & Rotate Images Selected From Gallery and Save it inside SD Card
  • Android Kotlin Project to Load Image From URL into ImageView Widget
  • Android Java Project to Make HTTP Call to JSONPlaceholder API and Display Data in RecyclerView Using GSON & Volley Library
  • Android Java Project to Download Youtube Video Thumbnail From URL & Save it inside SD Card
  • Android Java Project to Embed Google Maps & Add Markers Using Maps SDK
  • Angular
  • Bunjs
  • C#
  • Deno
  • django
  • Electronjs
  • java
  • javascript
  • Koajs
  • kotlin
  • Laravel
  • meteorjs
  • Nestjs
  • Nextjs
  • Nodejs
  • PHP
  • Python
  • React
  • ReactNative
  • Svelte
  • Tutorials
  • Vuejs




©2023 WebNinjaDeveloper.com | Design: Newspaperly WordPress Theme