在VScode新建一个C# hello world。配置好launch.json和tasks.json,debug显示结果正常,但是最后扔一句:
The program '/Users/JCNetwork-Mecil9/HomeWork/C#/projectApp/bin/Debug/netcoreapp1.1/projectApp.dll' has exited with code 0 (0x00000000).
在终端下dotnet运营运行又是正常,不报错。
bogon:projectApp JCNetwork-Mecil9$ dotnet run
Project projectApp (.NETCoreApp,Version=v1.1) was previously compiled. Skipping compilation.
Hello World!
不得其解!!!求解答!
task.json
{
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "build",
"args": [
"${workspaceRoot}/project.json"
],
"isBuildCommand": true,
"problemMatcher": "$msCompile"
}
]
}
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/projectApp.dll",
"args": [],
"cwd": "${workspaceRoot}",
"externalConsole": false,
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command.pickProcess}"
}
]
}