VSCode development C# (call Net Core) streamlined step-by-step instructions

 

 

VSCode development C# (call Net Core) streamlined step instructions When


reading the description below, you need to have certain programming experience and troubleshooting capabilities.


1. Download and install the .NET Core SDK 

* https://www.microsoft.com/net/download/core
    https://dotnet.microsoft.com/download


* Install .NET Core

* Open the console, type dotnet --help and see the version display, indicating that the installation is successful

 

 

 

2. Create a new dotnet core project


* Open the console

* cd ... //to your project root

* mkdir ... //make project dir

* dotnet new //The environment will be checked at the first run, and wait patiently until the prompt is completed.

* dotnet new --help //List the types of projects that can be created.

* dotnet new console //Create a console project.

* dotnet restore // create some configuration files

* dotnet run // create complete



2. Download VSCode

* https://code.visualstudio.com/

* Open VSCode, select "File"-"Open Folder", and open the newly created Project folder (project dir)

* Double-click the Program.cs file, and a prompt will appear below the menu bar, prompting to install C#, click download and install, yes, restart the IDE.
  (It will automatically download the relevant C# [OmniSharp] plug-in)

* After restarting, double-click other files under the project, if a prompt appears under the menu bar, click install or yes to restart the IDE 

 

 

  Repeat this process until there are no prompts. (Usually restart 2 to 3 times)

 

 

 

---------------------------

 

 

  It has to be said that this is the advantage of VSCode: it automatically senses what IDE can do, automatically prompts, and automatically installs
  

 

  Automatic update, automatic tell you what's wrong, how you should do next. Developers only need to click yes, yes, yes!


---------------------------

   

 

 

* All ok? All ready! Double-click to open Program.cs 

* Click the menu "Debug"-"Start debugging", if it goes well, the following will print "hello world"

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/RoadToTheExpert/article/details/70225640