C# configure development environment using vscode

1. Steps

(1) Download and install .net

(2) Test .net environment

(3) Configure C# of vscode

2. Operation

(1) Download and install .NET 

     1.1 Introduction: .NET is a .NET SDK concept similar to JDK. You can understand it as a cross-platform runtime environment (runtime) + command line and other developer tools. Download link:

https://dotnet.microsoft.com/zh-cn/download

        1.2 Installation Download the installation package and install it by default

        1.3 After the installation is completed, run dotnet in the command line to check whether the installation is normal. If the following interface does not appear, you need to configure the dotnet environment. Dotnet environment configuration method reference->3. Precautions.

 

(2) Test .net environment

Open the command line and execute dotnet new console -o MyAppto create a program.

Then cd MyApp into the folder, modify the code and add itConsole.WriteLine("Hello world");

dotnet runExecute. If executed correctly, everything is normal.
Reference: https://www.jianshu.com/p/21f6b57dec72
 

(3) Configure C# of vscode

  • Install VSCode
  • Open the MyApp folder just now with VSCode
  • Install C# plug-in
  • Press F5 (run in debug mode) or Ctrl + F5 (run directly without debugging) to run the program

Link: https://www.jianshu.com/p/21f6b57dec72
 

3. Things to note:

(1) donet environment configuration:
1.1 Find the dotnet.exe path:

 

1.2 Go to the environment settings to configure
    1), variable name: DOTNET_ROOT variable value C:\Program Files\dotnet
    2), variable name: PATH variable value C:\Program Files\dotnet

1.3 Verification: Open cmd and enter dotnet -h


Reference: https://www.jianshu.com/p/0e456813748d
 

Reference: https://docs.microsoft.com/en-us/dotnet/csharp/tour-of-csharp/

Guess you like

Origin blog.csdn.net/zaofenger/article/details/131443922