天天看點

VSCode添加MSBuild

在tasks.json裡面tasks下添加:

{
	"type": "shell",
	"label": "VS2019 MSBuild",
	"command": "${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\2019\\Enterprise\\MSBuild\\Current\\Bin\\MSBuild.exe",
	"args": [
		"${workspaceFolder}/media_player/demo/player_demo_win/player_demo_win.sln",
		// Ask msbuild to generate full paths for file names.
		"/p:Configuration=Debug",
		"/p:Platform=x86",
		"/p:GenerateFullPaths=true",
		"/t:build"
	],
	"group": "build",
	"presentation": {
		// Reveal the output only if unrecognized errors occur.
		"reveal": "silent"
	},
	// Use the standard MS compiler pattern to detect errors, warnings and infos
	"problemMatcher": "$msCompile",
	"options": {
		"cwd": "${workspaceFolder}/media_player/demo/player_demo_win"
	}
}
           

繼續閱讀