Not sure if this was your issue (not enough info in the post to know), but I found this post while trying to solve my issue, so I'm answering.
It's silly but the problem was that I was trying to run my task right after beginning a debug session, but that was opening a fresh vscode instance which had no workspace open. This will cause no tasks to show up if your tasks are scoped to Workspace (set using the Task constructor).