PIO, VSC can't build, no tasks found

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

Ah, got you now… yes, that is correct… as it says in the first sentence of the description of the extension, the extension itself considered a preview release, probably as it is a sub v1.0 release. The insiders builds are different, and add the tag -insiders, -insiders2, etc. to the actual version number.

1 Like

Check this setting. Very unobvious…

2 Likes

This may be of some use to someone else having this problem where the current solution in this thread does not work. I checked the settings menu under “Build Task” and found it was switched to “Auto Detect - on” which left me at a dead end because I still couldn’t get the project to build. I found this thread and the answer from XSRF. I drilled down to the file he suggested, located at:

Open %user%\AppData\Roaming\Code\User\settings.json

I discovered that this had NO CONTENT! I used Notepad++ to add one entry

{task.autoDetect": “on”
}

and blow me down, it verked!

3 Likes

This trick worked for me.