Created
June 16, 2025 18:47
-
-
Save kaem-e/66d78223ea60cf3600dacd0bdbaa0810 to your computer and use it in GitHub Desktop.
Run msbuild.exe (or cl.exe) from zed's tasks.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"label": "Build Visual Studio Project (Debug)", | |
"command": "| Out-Null;cd $env:ZED_WORKTREE_ROOT;msbuild.exe", | |
"args": [ | |
"(Split-Path $env:ZED_WORKTREE_ROOT -Leaf).sln", | |
"/p:Configuration=Debug", | |
"/p:Platform=x64", | |
"/m", | |
"/v:m", | |
";exit $LastExitCode" | |
], | |
// Keep "use_new_terminal": false and set "allow_concurrent_runs": true to allow cancelling previous tasks on rerun. | |
"use_new_terminal": false, | |
"allow_concurrent_runs": true, | |
// What to do with the terminal pane and tab, after the command was started: | |
// * `always` — always show the task's pane, and focus the corresponding tab in it (default) | |
// * `no_focus` — always show the task's pane, add the task's tab in it, but don't focus it | |
// * `never` — do not alter focus, but still add/reuse the task's tab in its pane | |
"reveal": "always", | |
// What to do with the terminal pane and tab, after the command had finished: | |
// * `never` — Do nothing when the command finishes (default) | |
// * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it | |
// * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always` | |
"hide": "on_success", | |
// Which shell to use when running a task inside the terminal. | |
// May take 3 values: | |
// 1. (default) Use the system's default terminal configuration in /etc/passwd | |
// "shell": "system" | |
// 2. A program: | |
// "shell": { | |
// "program": "sh" | |
// } | |
// 3. A program with arguments: | |
// "shell": { | |
// "with_arguments": { | |
// "program": "/bin/bash", | |
// "args": ["--login"] | |
// } | |
// } | |
"shell": { | |
"with_arguments": { | |
"program": "C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe", | |
"args": [ | |
"-noe", | |
"-c", | |
"\"&{Import-Module \"\"\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll\"\"\"; Enter-VsDevShell b8c64f93}\";echo" | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment