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

tasks.json - cwd property in task objects #8143

Closed
Pukka922 opened this issue Jun 25, 2016 · 2 comments
Closed

tasks.json - cwd property in task objects #8143

Pukka922 opened this issue Jun 25, 2016 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality tasks Task system issues

Comments

@Pukka922
Copy link

Pukka922 commented Jun 25, 2016

  • VSCode Version: 1.3.0-insider
  • OS Version: OS X 10.11.5
  • Language: C#

Steps to Reproduce:

My project structure is
global.json
.vscode (with launch.json and task.json)
src (folder) -> 2 Web Projects with 4 ClassLibaries that are shared between them

in the .vscode folder I have configured the launch.json
with two configurations, one for each web project from the src folder.
Now I need two build tasks for the configurations above but the
"options" -> "cwd" property can only set once global. So the problem
is here that the cwd should set in the specified build tasks like this.

"tasks": [ { "taskName" : "buildApp1", "cwd": "${workspaceRoot}/src/WebApp1", --- }, { "taskName" : "buildApp2", "cwd": "${workspaceRoot}/src/WebApp2", --- }, ]

at the moment its this so i has always change the cwd if I want to debug the other project:
"options": { "cwd": "${workspaceRoot}/src/WebApp1/" }, "tasks" : [ {"taskname": "buildApp1"} ..."]

@dbaeumer dbaeumer added tasks Task system issues feature-request Request for new features or functionality labels Jun 25, 2016
@dbaeumer dbaeumer self-assigned this Jun 25, 2016
@dbaeumer dbaeumer added this to the Backlog milestone Jun 25, 2016
@dbaeumer
Copy link
Member

If we introduce a cwd per task we should also allow to modify the env.

@dbaeumer
Copy link
Member

Fixed for new task v 2.0.0 support.

To verify (on Windows):

  • workspace with folderOne with content
  • tasks.json
{
	// See https://go.microsoft.com/fwlink/?LinkId=733558
	// for the documentation about the tasks.json format
	"version": "2.0.0",
	"tasks": [
		{
			"label": "dir",
			"type": "shell",
			"options": {
				"cwd": "./folderOne"
			},
			"command": "dir",
			"problemMatcher": []
		}
	]
}

should list the content of folderOne.

@dbaeumer dbaeumer removed this from the Backlog milestone Nov 10, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality tasks Task system issues
Projects
None yet
Development

No branches or pull requests

2 participants