How to Setup C-sharp & Run C# file in VSCode Terminal / VS Code / Visual Studio Code Windows 7 10 11

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial i'm going to show you the fastest way of running see sharp programs in visual studio code the first thing you want to do is download the net software development kit this will allow you to enter the net command directly from the command line so go ahead and type download.net into google i'm gonna go to the second link here and first we need to download the sdk so go ahead and click on that file and go back to that page and click on the runtime when downloading this you should select your operating system mine's windows x64 so i'll grab that i'm gonna wait until the file has finished downloading and go through the installation process now i will do the same with the second file which was the net runtime now once the runtime is installed go ahead to your start button in windows and type cmd now we're going to check if the dotnet has actually finished installing and if you see the version of here which is 6.0 in my case then it has been successfully installed now go ahead and open your vs code editor and go to extensions type in c sharp and the first extension is the one we're looking for click install and you might also want to install c-sharp extensions so type that in see sharp extensions select the second result install that as well and pretty much we're done here so i'm going to go ahead and close all of those tabs we can now create a new c sharp project i'm going to go to file menu and go to open folder i'm going to right click anywhere in the space to create a new folder i'm going to call this folder c sharp so i'm going to have c sharp on my c drive and go ahead and click select folder button the net command will generate our project automatically so we don't have to create a new file i'm going to go ahead and open terminal and type in dot net version just to check if it's still installed correctly and go ahead and type net new console which will create a new console application you'll notice that two new files were added to our project the project file and the actual source code for our c-sharp application to see this pop-up message so go ahead and click the yes button in the lower right corner and this will automatically add the required assets to run our c-sharp program go ahead and type net restore this will keep our files up to date and finally type net run and that will run our c-sharp application now i forgot to actually save the file so it's still showing the previous message but if i run it again it's gonna show the correct message i'm going to copy and paste the slightly bigger program into here and try to run that again so i'm going to type net run and this program is actually going to ask me to enter a message and it simply displays it again and pretty much that's how you run c-sharp applications in vs code
Info
Channel: Ghost Together
Views: 28,136
Rating: undefined out of 5
Keywords: c sharp, sharp, run, install, vscode, setup
Id: RdFgAXUvhYY
Channel Id: undefined
Length: 3min 34sec (214 seconds)
Published: Wed Apr 06 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.