How to configure the tasks.json problemMatcher property? #189
-
|
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 |
Beta Was this translation helpful? Give feedback.
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)"
} |
Beta Was this translation helpful? Give feedback.
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)