Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not find the task..." error when using a .code-workspace file. #192041

Closed
JaneySprings opened this issue Sep 2, 2023 · 7 comments
Closed
Assignees
Labels
tasks Task system issues
Milestone

Comments

@JaneySprings
Copy link

JaneySprings commented Sep 2, 2023

Hello. I created a debugger for .NET apps. It's requires a preLaunchTask: "dotnet-meteor: Build" in the launch.json. This task is always provided by vscode.TaskProvider (TaskScope.Workspace):
https://github.com/JaneySprings/DotNet.Meteor/blob/main/src/VSCode.Extension/tasks/build.ts

If you are not using a code-workspace file, then you can create a launch.json file and run the debug.
But if you use the code-worksapce file, then when you run the debug you will get the error:
image

in the debug, I see that VSCode requests a task and receives a response, but the error still occurs:
https://github.com/microsoft/vscode/assets/48021947/cdac4035-1cc6-4184-afc6-5255b6bb0be0

Does this issue occur when all extensions are disabled?: Yes

Version: 1.81.1 (Universal)
Commit: 6c3e3db
Date: 2023-08-09T22:20:33.924Z (3 wks ago)
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.6.0

@JaneySprings JaneySprings changed the title "Could not find the task..." error when using a .code-worksapce file. "Could not find the task..." error when using a .code-workspace file. Sep 2, 2023
@meganrogge meganrogge added this to the September 2023 milestone Sep 5, 2023
@meganrogge
Copy link
Contributor

I cannot reproduce in insider's - it's possible this was fixed in the past month. Could you pls verify if it's working for you?

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Sep 29, 2023
@meganrogge meganrogge removed this from the October 2023 milestone Sep 29, 2023
@JaneySprings
Copy link
Author

Hi! I tried on сode-Insiders version, but nothing changes :(
I created a simple extension where you can reproduce this bug:
https://github.com/JaneySprings/VSCodeLaunchBug

It also contains two folders:
https://github.com/JaneySprings/VSCodeLaunchBug/tree/main/SimpleFolder - folder with launch.json
https://github.com/JaneySprings/VSCodeLaunchBug/tree/main/SimpleFolderWorkspace - folder with code-workspace

Recording.2023-09-30.115937.mp4

@meganrogge meganrogge removed the info-needed Issue requires more information from poster label Oct 2, 2023
@meganrogge meganrogge added this to the October 2023 milestone Oct 2, 2023
@meganrogge meganrogge added confirmed Issue has been confirmed by VS Code Team member bug Issue identified by VS Code Team member as probable bug and removed confirmation-pending labels Oct 20, 2023
@meganrogge
Copy link
Contributor

In your repro, where is Test: task defined? I think that's the issue.

@meganrogge
Copy link
Contributor

See it is working here when the task has been defined.

workspace.mov

@meganrogge
Copy link
Contributor

I get the same error when launching from the simple folder for that reason.

Image

@meganrogge meganrogge removed bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member labels Oct 20, 2023
@JaneySprings
Copy link
Author

@meganrogge it's work when task defined. But why is it not necessary to create tasks.json for a simple folder? Is this definitely not a bug?

@meganrogge
Copy link
Contributor

The task has to be defined somewhere - whether in the workspace file or the tasks.json for us to know what to run.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tasks Task system issues
Projects
None yet
Development

No branches or pull requests

2 participants