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

Path to tasks.json 'process' is incorrectly resolved in Windows Visual Studio Codespaces #101073

Closed
gregg-miskelly opened this issue Jun 25, 2020 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Milestone

Comments

@gregg-miskelly
Copy link
Member

gregg-miskelly commented Jun 25, 2020

  • VSCode Version: 1.45.1
  • OS Version: Windows 10.0.19041

This issue is from a bug opened by @kendrahavens (dotnet/vscode-csharp#3878)

Steps to Reproduce:

  1. Create a VSCode Codespaces instance with default .NET Core console app template in Windows Codespaces (doesn't repro with Linux)
  2. Open with "Connect" option to open with VSCode in the web browser
  3. Accept pop-up to load debug assets
  4. Run the build task.

Result:

tasks.json tries to run dotnet.exe from C:\workspace\dotnet instead of from where it is installed, and so it fails.

Terminal output

> Executing task: C:\workspace\dotnet build C:\workspace/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <

The terminal shell path "C:\workspace\dotnet" does not exist

Terminal will be reused by tasks, press any key to close it.

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "command": "dotnet",
            "type": "process",
            "args": [
                "build",
                "${workspaceFolder}/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "publish",
            "command": "dotnet",
            "type": "process",
            "args": [
                "publish",
                "${workspaceFolder}/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "watch",
            "command": "dotnet",
            "type": "process",
            "args": [
                "watch",
                "run",
                "${workspaceFolder}/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        }
    ]
}
@alexr00
Copy link
Member

alexr00 commented Jun 26, 2020

For this step:

Create a VSCode Codespaces instance with default .NET Core console app template in Windows Codespaces (doesn't repro with Linux)

How do I get the default .NET Core console app template?

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels Jun 26, 2020
@alexr00 alexr00 added this to the July 2020 milestone Jun 26, 2020
@kendrahavens
Copy link

@alexr00 If dotnet is installed, you can run dotnet new console from the terminal. docs

@alexr00
Copy link
Member

alexr00 commented Jun 30, 2020

Looks like findExecutable needs to be moved to the extension host. This wasn't needed before because it's only required for Windows, and we didn't have Windows remotes.

@allan-mobley-jr
Copy link

allan-mobley-jr commented Jul 10, 2020

Visual Studio Codespaces Insiders

Encountering the same issue with dotnet new webapp.

  • Running codespace from Chrome browser with Insiders switch turned on under settings.
  • Self-hosted Windows machine

I can get around this with using the absolute path in command:

"tasks": [
        {
            "label": "build",
            "command": "C:\\Program Files\\dotnet\\dotnet.exe",
            "type": "process",
            "args": [
                "build",
                "${workspaceFolder}/QBCart.Server.Client.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        },
        ...
]

alexr00 added a commit that referenced this issue Jul 13, 2020
alexr00 added a commit that referenced this issue Jul 14, 2020
@alexr00
Copy link
Member

alexr00 commented Jul 14, 2020

I tested with an SSH Windows remote, and I see the executable path being correctly found now. Please let me know if you try it out in the next insiders build!

@alexr00 alexr00 closed this as completed Jul 14, 2020
Charles-Gagnon pushed a commit to Charles-Gagnon/vscode that referenced this issue Jul 14, 2020
@roblourens
Copy link
Member

I'm using a windows codespace, with the build from 7/23, and I think I still see this issue

image

@roblourens roblourens reopened this Aug 6, 2020
@roblourens roblourens added the verification-found Issue verification failed label Aug 6, 2020
@alexr00
Copy link
Member

alexr00 commented Aug 7, 2020

Interesting. I tried it with a windows codespace and got:

C:\Program Files\dotnet\dotnet.exe build C:\workspace/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode/TestCodespacesWindowsAndVSCode.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <

This is with the build from 8/3. Not sure what could be going on here. I'm going to close and see if someone else can verify.

@alexr00 alexr00 closed this as completed Aug 7, 2020
@alexr00 alexr00 removed the verification-found Issue verification failed label Aug 7, 2020
@roblourens roblourens added the verified Verification succeeded label Aug 11, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants