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

[Codespaces] debugging results in prelaunch task 'build' error #3878

Closed
kendrahavens opened this issue Jun 25, 2020 · 5 comments
Closed

[Codespaces] debugging results in prelaunch task 'build' error #3878

kendrahavens opened this issue Jun 25, 2020 · 5 comments

Comments

@kendrahavens
Copy link
Contributor

kendrahavens commented Jun 25, 2020

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
Version: 3.1.400-preview-015178
Commit: 60cb58d3b1

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.400-preview-015178\

Host (useful for support):
Version: 3.1.5
Commit: 65cd789777

.NET Core SDKs installed:
2.1.807 [C:\Program Files\dotnet\sdk]
3.1.301 [C:\Program Files\dotnet\sdk]
3.1.400-preview-015178 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

VS Code version: Version: 1.45.1

C# Extension version:1.22.1

OmniSharp log

Starting OmniSharp server at 6/25/2020, 7:31:41 PM
Target: c:\workspace\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode.sln

OmniSharp server started.
Path: C:\Users\vsonline.vscode-remote\extensions\ms-dotnettools.csharp-1.22.1.omnisharp\1.35.3\OmniSharp.exe
PID: 5992

Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.4 - "C:\Users\vsonline.vscode-remote\extensions\ms-dotnettools.csharp-1.22.1.omnisharp\1.35.3.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'C:\Users\vsonline.vscode-remote\extensions\ms-dotnettools.csharp-1.22.1.omnisharp\1.35.3.msbuild\Current\Bin\MSBuild.exe'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.4 - "C:\Users\vsonline.vscode-remote\extensions\ms-dotnettools.csharp-1.22.1.omnisharp\1.35.3.msbuild\Current\Bin"
CscToolExe = csc.exe
CscToolPath = C:\Users\vsonline.vscode-remote\extensions\ms-dotnettools.csharp-1.22.1.omnisharp\1.35.3.msbuild\Current\Bin\Roslyn
MSBuildExtensionsPath = C:\Users\vsonline.vscode-remote\extensions\ms-dotnettools.csharp-1.22.1.omnisharp\1.35.3.msbuild
MSBuildToolsPath = C:\Users\vsonline.vscode-remote\extensions\ms-dotnettools.csharp-1.22.1.omnisharp\1.35.3.msbuild\Current\Bin
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'c:\workspace\TestCodespacesWindowsAndVSCode'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'c:\workspace\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\workspace\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\workspace\TestCodespacesWindowsAndVSCode'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\workspace\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode.csproj
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\workspace\TestCodespacesWindowsAndVSCode' on host 11656.
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\workspace\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\workspace\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode\TestCodespacesWindowsAndVSCode.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: TestCodespacesWindowsAndVSCode

Steps to reproduce

  1. Create a VSCode Codespaces instance with default .NET Core console app template
  2. Open with "Connect" option to open with VSCode in the web browser
  3. Accept pop-up to load debug assets

image

image

  1. Attempt to debug results in error
    image

  2. "Debug anyway" option will successfully debug.

Expected behavior

No error window

Actual behavior

image

@kendrahavens kendrahavens changed the title [Codespaces] [Codespaces] debugging results in prelaunch task 'build' error Jun 25, 2020
@gregg-miskelly
Copy link
Contributor

@kendrahavens what is output to your Terminal output pane?

Note that this is unlikely to be a problem with this extension - unless we are providing the wrong dotnet build command line this is either a .NET CLI problem, or it is a VS Code problem.

@kendrahavens
Copy link
Contributor Author

kendrahavens commented Jun 25, 2020

Right, feel free to route as needed. I suspect it's a VS Codespaces issue. I'm on the windows preview codespaces environment as opposed to the linux. (I should test it out in linux and see if it repros.)

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.

@kendrahavens
Copy link
Contributor Author

I can confirm, no error appears when using the same solution on the linux codespace. Looks like a windows codespace specific issue.

@gregg-miskelly
Copy link
Contributor

Well the problem is that something has decided that dotnet.exe is in c:\workspace. What does your tasks.json look like?

@kendrahavens
Copy link
Contributor Author

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"
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants