Visual studio code 在VS代码中链接启动前任务
是否可以使用VS代码调用多个启动前任务 我尝试恢复包,然后构建,然后运行,但我只能配置构建 My launch.json:Visual studio code 在VS代码中链接启动前任务,visual-studio-code,.net-core,Visual Studio Code,.net Core,是否可以使用VS代码调用多个启动前任务 我尝试恢复包,然后构建,然后运行,但我只能配置构建 My launch.json: { "name": ".NET Core Launch (console)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${workspaceRoot}/src/myProject
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/src/myProject/bin/Debug/netcoreapp1.0/myProject.dll",
"args": [],
"cwd": "${workspaceRoot}/src/myProject",
"stopAtEntry": false,
"externalConsole": false
},
My tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "build",
"args": [
"./**/project.json"
],
"isBuildCommand": true,
"showOutput": "always",
"problemMatcher": "$msCompile"
}
]
}
因此,我尝试指定
dotnet restore
命令,但它不起作用。您如何配置任务?我将启动前任务:“build”作为默认值,当您收到创建launch.json的提示时生成。但是,我不知道该参数是否可以接受多个任务,或者您是否可以在tasks.json中定义依赖项,以便我可以运行restore Previor build。这有意义吗?我也尝试过在任务的参数中这样做:“dotnet restore&&dotnet build”,但我无法让它工作。你能发布你的project.json
和任何其他相关配置文件吗?我通过添加launch.json和tasks.json编辑了我的问题