tasks.json
昨晚浏览默认文件时,我一定很不耐烦。有一个部分引用了 msbuild(朝向底部):
// Uncomment the section below to use msbuild and generate problems
// for csc, cpp, tsc and vb. The configuration assumes that msbuild
// is available on the path and a solution file exists in the
// workspace folder root.
/*
{
"version": "0.1.0",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true"
],
"taskSelector": "/t:",
"showOutput": "silent",
"tasks": [
{
"taskName": "build",
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the standard MS compiler pattern to detect errors, warnings
// and infos in the output.
"problemMatcher": "$msCompile"
}
]
}
*/
只需注释掉文件的其余部分,取消注释上面的 JSON 文本,然后将“command”从“msbuild”更改为“xbuild”(相当于 Mono)。现在点击ctrl++shift成功B编译项目。
希望一旦退出预览版,手动修改配置文件的必要性或繁琐性将降低。
编辑
暂时将此标记为答案。如果在产品发展过程中发生变化,将更新或接受更好的答案。