New terminal is opened without restoring path from the previous terminal in VS code #169195
Replies: 1 comment 1 reply
-
This is a common VS Code Copilot workflow issue - here are several solutions: Hi @NickolaiA! You're right, this is frustrating when working with .NET projects. Copilot should be smarter about working directory context. Immediate workarounds:1. Configure VS Code terminal behavior: // In settings.json
{
"terminal.integrated.cwd": "${workspaceFolder}",
"terminal.integrated.inheritEnv": true,
"dotnet.defaultSolution": "auto"
} 2. Use workspace-relative commands with Copilot: 3. Be specific about project structure:
Better Copilot prompting techniques:Context-aware commands:
Project structure hints:
VS Code settings to help Copilot:1. Set default build tasks: // In tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"args": ["build"],
"options": {
"cwd": "${workspaceFolder}"
}
}
]
} 2. Configure integrated terminal: {
"terminal.integrated.defaultProfile.windows": "PowerShell",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"args": ["-NoExit", "-Command", "cd '${workspaceFolder}'"]
}
}
} Submit feedback to improve Copilot:VS Code Copilot Issue:
GitHub Copilot Feedback: TIP:Create a This issue affects many .NET developers, so your feedback will help improve the experience! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Copilot Feature Area
VS Code
Body
It is quote annoying that Github Copilot opens new terminal to run different commands like "dotnet run" without restoring path from the previous tab. as the result, it retries to run command properly and waste a lot of time to do it again and again. Can it be somehow improved? Github instructions are also not helping to help copilot to go to the proper folder every time when it must compile or run .Net code
Beta Was this translation helpful? Give feedback.
All reactions