Skip to content

Instantly share code, notes, and snippets.

@brccabral
Created February 26, 2026 21:45
Show Gist options
  • Select an option

  • Save brccabral/0e33a01cbe8094b1699f3c381d50dd02 to your computer and use it in GitHub Desktop.

Select an option

Save brccabral/0e33a01cbe8094b1699f3c381d50dd02 to your computer and use it in GitHub Desktop.
C# in VSCode

C# in VSCode

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "dotnet: build Release",
            "command": "dotnet",
            "type": "process",
            "args": [
                "build",
                "${workspaceFolder}",
                "-c",
                "Release"
            ],
            "problemMatcher": "$msCompile"
        }
    ]
}

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C# Debug",
            "type": "dotnet",
            "request": "launch",
            "projectPath": "${workspaceFolder}/${workspaceFolderBasename}.csproj"
        },
        
        {
            "name": "C# Release",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "dotnet: build Release",
            "program": "${workspaceFolder}/bin/Release/net10.0/${workspaceFolderBasename}.dll",
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "integratedTerminal"
        }

    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment