Skip to content

[BUG] Extension does not use build task from tasks.json for tests #198

Open
@brizdotdev

Description

@brizdotdev

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

  1. Create a new .NET project with tests
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-testTest discovery, execution, debuggingbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions