Define multiple tasks in VSCode

后端 未结 13 2095
旧时难觅i
旧时难觅i 2020-11-28 05:40

I have seen that it is possible to define a task in the VSCode. But I am not sure how to define multiple tasks in the tasks.json file.

13条回答
  •  醉酒成梦
    2020-11-28 06:03

    Thanks to this thread, I now have c# / dnxcore50 build and test debug etc working in vscode on osx with this:

    {
    "version": "0.1.0",
    "command": "bash",
    "args": [
    ],
    "tasks": [
        {
            "taskName": "xbuild",
            "args": [
                "./src/Service.Host/Service.Host.csproj"
            ],          
    
            "showOutput": "always",
            "problemMatcher": "$msCompile",
            "isBuildCommand": true
        },
        {
            "taskName": "dnx",
            "args" : ["-p", "./test/Service.Tests.Unit", "test"],
            "isTestCommand": true,
            "showOutput": "always"    
        }      
    ]
    }
    

    I am sure linux would be basicly the same. The only thing that is anoying me is having to maintain the .csproj files just for debuging. I am looking forward to a way to debug with dnx, though I have not looked for a couple of weeks now.

提交回复
热议问题