I’m running VSC 1.40.0 and PIO 1.9.3 is shown as enabled. (But the PIO home tab shows Home 3.0.0 Core 4.1.0. Not sure how they relate…)
But, when I open an old project or create a new on and attempt to build or upload to the target device a popup say no tasks available is displayed.
Since I never created task before I have no idea why they went missing or how to get them back.
I only found one post about this issue, but it was marked solved by upgrading to the latest revision available at that point in time…a version which is now an old revision.
The current working directory /home/mac/Documents/PlatformIO/Projects/Electrol_New_Brains-2 will be used for the project.
The next files/directories have been created in /home/mac/Documents/PlatformIO/Projects/Electrol_New_Brains-2
include - Put project header files here
lib - Put here project specific (private) libraries
src - Put project source files here
platformio.ini - Project Configuration File
Project has been successfully updated including configuration files for `vscode` IDE.
But restarting VSC gets same error: No task to run found. Configure Tasks…
Huh. Can you copy-paste the contents of the file /home/mac/Documents/PlatformIO/Projects/Electrol_New_Brains-2/.vscode/tasks.json here? (.vscode is a hidden folder)
I have the same problem and also, as drmacro I don’t have any tasks.json file in the .vscode directory. I think this happened when VSCode upgraded itself to 1.40.0.
Maybe ivankravets has an idea on how to solve this?
As for what version it worked…the folder was created in September. I hadn’t worked on the code since. But, I don’t know what the rev was then…it did compile and upload fine then though.
I started getting the same thing, the ‘no task to run found. Configure tasks’, after VS Code told me to click on a ‘disable typescript it’s running too slow’ button.
All we need is a sample tasks.json file to get back up and running, please can someone post the content of their tasks.json. I went through the source but it’s not in there so I’m guessing it’s automatically generated.
Are the tasks in the PIO task explorer also non-working for you? Because that’s the equivalent with which you usually work in the VSCode extension. Just as the docs show.
Thanks, but mine doesn’t look like quite like that, I just get the boilerplate list of tasks, clicking on any gives the same message as [lcerda] posted above (no task to run found…). There’s nothing like the extra fields shown in the link you posted.
Tried:
Adding the template as VSCode suggests (no change).
Uninstall VSCode and reinstall (no change).
Will now try - uninstall VSCode, find all instances of .vscode buried in local settings etc. then another re-install.
Still think if someone could post their tasks.json it would fix this pretty quick.
If you get a popup saying ‘disable java for typescript’ just don’t press it!! The setting to reverse this is hidden deep within some settings file that persists between uninstalls which you can’t get to through normal means. But that’s academic - anyone here has found this after clicking on it.
After the next uninstall/reinstall cycle if I find any buried setting I’ll repost.
Here’s what my tasks.json looks like:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"problemMatcher": []
}
]
}
Any further ideas? Could we see what a ‘healthy’ tasks.json looks like? Is there any link - I’ve tried exhaustive searching but it seems there’s no example.
EDIT: further searching reveals that VSCode creates a private registry. Could this be the source of the errors?
It is defintely not good, because I also think there is a problem with the “disable java for typescript” (as Cryptocacher mentioned too), since every time I do a build, upload or even a monitor, my cores go wild for 20 secs (or so) and just then it starts doing the actual job. And I think it is related to the typescript thing. Anyways, now it working (although slowly) again.
cleaned python installs (had quite a few different versions installed), and updated to the latest 3.80
re-installed platformIO.
removed all projects from the workspace
closed workspace, started a new workspace and added the previous projects.
Now I have a much cleaner VS Code install the syntax colouring and auto-formatting are working a lot better. Sorry this isn’t definitive, but at least I didn’t need to install the tasks.json file.
your .vscode folder in the project folder shouldn’t contain any tasks.json either.
So - I think there could be settings in the workspace which affect this. Try making a new workspace.