microsoft / microsoft/vscode-dotnettools
[BUG] Extension does not use build task from tasks.json for tests
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 321
- Forks
- 54
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 2
Description
Describe the Issue
In my tasks.json I have the build task set to not open the panel and close the terminal instead of the "Terminal will be reused by tasks, press any key to close it." message.
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/MySolution.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile",
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"close": true,
}
}
However, when running a test from the testing view, the panel still opens and the reuse message still appears.
Is there a way to customize the build task used when running tests?
Steps To Reproduce
- Create a new .NET project with tests
- Add the following to build task:
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"close": true,
}
Expected Behavior
When a test is run, the build task is invoked and the panel does not appear and the terminal used for the build is closed after.
Environment Information
- VSCode: Version: 1.80.0-insider
- C# DevKit: v0.1.103
- OS: Windows 11
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue from the VS Code testing view using the tasks.json build task and the listed presentation settings. Trace how C# Dev Kit invokes the build task; done when running a test respects the task's panel, reuse-message, and terminal-close settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, vscode
- Domain
- developer-experience, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100