鉴于网上教程为数较少,为此写下教程.
此教程适合于广大Mac以及Linux用户,Windows用户可选宇宙无敌的VS.
tva2.sinaimg.cn/large/006tNc79ly1fzhrwyq1tkj312q0u0ast.jpg)
Shell
1Mono-mdk
2vsc
3Mono-debug
COPY
以下命令能正确运行即安装成功
{
"version": "2.0.0",
// 该命令需要在系统变量内定义
"tasks": [
{
"label": "build",
"command": "mcs",
"type": "shell",
"args": [
"${file}","--output","Debug/${fileBasenameNoExtension}.exe"
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"problemMatcher": []
}
],
}
json
1{
2
3 "version": "0.2.0",
4 "configurations": [
5 {
6 "name": "Launch",
7 "type": "mono",
8 "request": "launch",
9 "preLaunchTask": "build",
10 "program": "${workspaceRoot}/Debug/${fileBasenameNoExtension}.exe",
11 "cwd": "${workspaceRoot}",
12 "console": "externalTerminal",
13 },
14
15 ]
16}
COPY
在工作区目录下新建一个Debug文件夹.
以后调试生成的程序都在这里.
namespace HelloWorld
{
class Hello {
static void Main(string[] args)
{
System.Console.WriteLine("Hello World!!");
}
}
}