Recently I am learning C#, and the operating environment is generally in vs. However, I want to write some short test codes or I am used to using vscode to record the configuration process.
VSCode configuration C# runtime environment
1. Download dotnet-sdk
- Download link: https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install
If you are too lazy to download from the official website, you can directly take me to download it and put it on the Baidu network disk. You can download it
yourself if you need it. Link: https://pan.baidu.com/s/1mwpoXmshW4Ix1ro87pgapw
Extraction code: f31t
- Installed, directly after opening the downloaded
exe
file, install point on the bin, you do not need to configure additional - After installing,
win+r
opencmd
test, inputdetnet -h
, shown below:
Then dotnet-sdk is installed.
2. VSCode install C# plugin
- First create a folder in any directory to store the C# project [just find a directory and create a folder , no spaces in the path! ! ! 】
- Click in VSCode
文件
, select the folder you just created to open
- Download and install the C# plugin, restart VSCode after the installation is complete
3. Create & run C# program
-
Open terminal
-
Input terminal
dotnet new console
to create project
-
F5 finished