PIO, VSC can't build, no tasks found

Thanks. The sudo apt-mark hold code worked for me too (I was also getting the unwanted updates). Well, we’ll see… it is working for now at least :slight_smile:

All the best

2 Likes

thanks @lcerda , from your answer the complete provisional workaround is:

sudo apt-get remove code --purge
sudo apt-get install code="1.39.2-1571154070"
sudo apt-mark hold code

works fine with Debian 10.

Okay, I ran into the same issue today on Windows 10.
I’ve uninstalled VSC, deleted .platformio and .vscode from my user directory. I deleted .vscode and .pio from my project directory. I’ve reinstalled VSC x64 1.40.2 (System setup). Reinstalled PlatformIO, opened my project folder in VSC and… still got the isse :frowning:
I’ve then installed VSC on an other Windows 10 PC, copied my project, installed PIO and the tasks worked fine.
I may have also clicked the disable typescript button…
How do I solve the issue? Downgrading is not an option…

Okay, solved the issue:

CTRL+Shift+P: Preferences: Open Settings (JSON)
or
Open %user%\AppData\Roaming\Code\User\settings.json (missed that during reinstall)

Delete "task.autoDetect": "off"

I have no idea how it got there…

14 Likes

Oh god, thank you. You’ve saved me hours of pain, cause my deadline is in two days :slight_smile:

2 Likes

Just some more data points.

I tried what @xsrf recommended with CTRL+Shift+P with 1.39

  • running on the Ubunt 19.04 system that I started this thread with.
  • that opened up an editor with the json and I deleted "task.autoDetect": "off"
  • closed VSC
  • installed 1.40, started VSC
  • tried CTRL+Shift+P (but it showed the preferences tab as if I’d clicked File>Preferences…)
  • couldn’t find any sign of the task.autoDetect
  • attempted to build my code as usual
  • builds fine.

On a different PC running Ubuntu 19.10, that had no prior install of VSC, I installed VSC 1.40 from scratch.
Build worked fine first try…

2 Likes

just come here to say thank you. saved my night :slight_smile:

1 Like

Thank you!
One more thing, maybe related. At least, disappearing-tasks problem appeared when ms-vscode.cpptools extension self-switched to “insiders” channel (maybe, i clicked “update”, but not sure, anyway - ms-vscode.cpptools want to switch to “insiders”, because when i switched it back to “default” it ask me to swith to “insiders” again, but i have rejected, of course).
And, seems like, this “insiders” “damaged” something else (inluding build tasks of PIO)

2 Likes

Thanks for this hint - saved me lots of pain…

1 Like

Thankssss!!! saved my life!!

The solution by XSRF worked for for me as well (task.autoDetect was off). Thanks!

1 Like

it was OK yesterday, today morning, got same issue, but thanks, it works
CTRL+Shift+P: Preferences: Open Settings (JSON)
Delete "task.autoDetect": "off"

1 Like

This is a very hot topic. I still do not understand. Who does set "task.autoDetect": "off"?

I’m new to platformio, it showed me some message that auto tasks is slowing your system, click here to turn off auto tasks, some notification like that, so I think issue appeared after I clicked that button.

Do you have other VSCode extensions? PlatformIO extension should not slow your machine.

God damn M$… Present people with a “Would you like your computer to stop working?” button and of course they’ll click ‘Yes’ so it goes away! Where was the “If you don’t know what an auto task is, you probably shouldn’t be clicking this button?” warning label? :laughing:

Thanks for the solution !!!

How can you tell if you are on the insiders version of cpptools? When I look at the extension, its listed as “preview” and I seem to be running the lastest version 0.26.3.

I’m currently running 0.26.3 but it’s not listed as preview… The insiders version of the extension normally end the version number with -insiders, but maybe there are also -preview versions also? Anyway… a straight 0.26.3 appears to be the latest release version.

1 Like

Curious.

Here is what I see:

Looking at the git repo, the first paragraph does says the extension is in preview:

This preview release of the C/C++ extension adds language support for C/C++ to Visual Studio Code, including features such as IntelliSense and debugging.

1 Like