PlatformIO Community

Sudden task errors

Error: The PlatformIO task detection didn't contribute a task for the following configuration:
{
    "type": "PlatformIO",
    "task": "Build",
    "problemMatcher": [
        "$platformio"
    ]
}
The task will be ignored.
Error: The PlatformIO task detection didn't contribute a task for the following configuration:
{
    "type": "PlatformIO",
    "task": "Build",
    "problemMatcher": [
        "$platformio"
    ]
}
The task will be ignored.

I’ve suddenly started to encounter these types of “errors”. I have no idea why or how.

All I am doing is hitting CTRL+ALT+B.
I have also tried CTRL+SHIFT+B and it has the same result.

What happened ?

This is my platformio.ini :


[env:esp32-evb]
platform = https://github.com/platformio/platform-espressif32.git
board = esp32-evb
framework = arduino
board_build.flash_mode = qio
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
monitor_speed = 115200
upload_speed = 115200
build_flags = -DCORE_DEBUG_LEVEL=5

#libraries
lib_deps =  https://github.com/me-no-dev/ESPAsyncWebServer.git
            https://github.com/me-no-dev/AsyncTCP.git

I have made new projects and I couldn’t get rid of these.
I have tried deleting .vscode and restarting VSCode,

I don’t have tasks.json inside .vscode.
I have created one and copied what I found here: http://docs.platformio.org/en/latest/ide/vscode.html#task-runner

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "PlatformIO",
            "task": "Monitor",
            "problemMatcher": [
                "$platformio"
            ],
            "presentation": {
                "panel": "new"
            }
        }
    ]
}

And I still got those.

1 Like

Please report to https://github.com/platformio/platformio-vscode-ide/issues

Same issue here.
For me this error came from a totally unrelated project, that I happened to have open, while building mine.
Removing the .vscode/tasks.json in that other project solved the issue for me.

Now I am wondering, how the Build button knows, which project to build. Does somehow visit them all, if I have multiple projects opened?

Yeah, VSCode does some weird things at times… if I have another project open as part of a multi-root workspace, if one of those other projects has a gulp task configured, but the current one doesn’t, VSCode whines about not being able to find the gulp task (which doesn’t exist :man_facepalming:).