Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"No launchable target found" with newest VS Code + C# Dev Kit

Ever since "C# Dev Kit" came around, launch.json content changed to a simpler, yet (so far for me), completely useless content:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        
        {
            "name": "C#: DbRefs Debug",
            "type": "dotnet",
            "request": "launch",
            "projectPath": "${workspaceFolder}/DbRefs.csproj"
        }

    ]
}

Apparently now we are meant to "launch" a project file instead of debugging by attaching to the compiled DLL, whatever this means.

Well, I would love to test-drive this new thing, except that it never works for me. 100% of the time, be it an existing project or a new Hello World project, I always get the error message "xxx.csproj does not support debugging. No launchable target found.".

Any pointers?

like image 697
José Ramírez Avatar asked Feb 11 '26 13:02

José Ramírez


1 Answers

Projectpath should have double backslash instead of slashes

"projectPath": "${workspaceFolder}\\DbRefs.csproj"

https://github.com/microsoft/vscode-dotnettools/issues/950

like image 139
Bjorn Avatar answered Feb 15 '26 23:02

Bjorn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!