用VScode新建C# HW程序,出现has exited with code 0 (0x00000000).错误,请问怎么回事

在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}"
        }
    ]
}
阅读 7.7k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进