How to configure the tasks.json problemMatcher property? #189
Answered
by
dzsquared
stijnherreman
asked this question in
Q&A
|
I'm trying out the Microsoft.Build.Sql SDK for some existing databases, using the SQL Database Projects extension in VS Code. The build output gives me over 1000 warnings, so I tried configuring tasks.json with a problem matcher to get a better overview of the problems. {
"version": "2.0.0",
"tasks": [
{
"label": "build example",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/example/example.sqlproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Unfortunately |
Answered by
dzsquared
Mar 24, 2026
Replies: 1 comment 3 replies
|
I just tested and for me this works in VS Code, I get the problems listed in the "Problems tab. I know this is a very old post but maybe worth trying @stijnherreman ? This is using {
"label": "Build",
"type": "shell",
"command": "dotnet",
"args": [
"build",
"--configuration",
"Release",
"--nologo",
"example.sqlproj",
"/p:RunSqlCodeAnalysis=true",
"/p:WarningsAsErrors=\"\"",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": "$msCompile",
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Builds the SQL project (Release, SQL code analysis)"
} |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
we've introduced the problem matching directly in the sqlproj extension in vscode - https://github.com/microsoft/vscode-mssql/blob/7d4df3232ba9b1f35d042cb3384494f368737d51/extensions/sql-database-projects/package.json#L545
and @yooakim is right on with the tasks json definition (which can also be setup by the sqlproj extension during project creation, but only manually after the project is created)