Skip to content

Commit f076ba7

Browse files
author
mikeblome
committed
updates to task.vs.json ref topic
1 parent 8007e64 commit f076ba7

2 files changed

Lines changed: 54 additions & 62 deletions

File tree

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,62 @@
11
---
22
title: "Tasks.vs.json schema reference (C++)"
3-
ms.date: "02/11/2019"
3+
ms.date: "08/07/2019"
44
helpviewer_keywords: ["Open Folder Projects in Visual C++"]
55
ms.assetid: abd1985e-3717-4338-9e80-869db5435175
66
---
77
# Tasks.vs.json (C++)
88

9-
A `tasks.vs.json` file can be added to an Open Folder project to define any arbitrary task and then invoke it from the **Solution Explorer** context menu. CMake projects typically do not use this file because all the build commands are specified in `CMakeLists.txt`. For build systems other than CMake, this is where you can specify your build commands and invoke build scripts. For general information about using tasks.vs.json, see [Customize build and debug tasks for "Open Folder" development](/visualstudio/ide/customize-build-and-debug-tasks-in-visual-studio).
9+
A *tasks.vs.json* file can be added to an Open Folder project to define any arbitrary task and then invoke it from the **Solution Explorer** context menu. CMake projects typically do not use this file because all the build commands are specified in *CMakeLists.txt*. For build systems other than CMake, *tasks.vs.json* is where you can specify build commands and invoke build scripts. For general information about using *tasks.vs.json*, see [Customize build and debug tasks for "Open Folder" development](/visualstudio/ide/customize-build-and-debug-tasks-in-visual-studio).
1010

11+
## Default Properties
12+
13+
||||
14+
|-|-|-|
15+
|**Property**|**Type**|**Description**|
16+
|`taskName`|string| Specifies the task label used in the user interface (Deprecated: Use `taskLabel` instead).|
17+
|`taskLabel`|string| (Required.) Specifies the task label used in the user interface.|
18+
|`appliesTo`|string| (Required.) Specifies which files the command can be performed on. The use of wildcards is supported, for example: "*", "*.cpp", "/*.txt"|
19+
|`contextType`|string| Allowed values: "custom", "build", "clean", "rebuild". Specifies the build target invoked when running the task. Defaults to "custom".|
20+
|`output`|string| Specifies an output tag to your task.|
21+
|`inheritEnvironments`|array| Specifies a set of environment variables inherited from multiple sources. You can define variables in files like *CMakeSettings.json* or *CppProperties.json* and make them available to the task context.|
22+
|`passEnvVars`|boolean| Specifies whether or not to include additional environment variables to the task context. These variables are different from the ones defined using the `envVars` property. Defaults to "true".|
23+
24+
## Remote Properties
25+
26+
||||
27+
|-|-|-|
28+
|**Property**|**Type**|**Description**|
29+
|`remoteMachineName`|string|The name of the remote machine.|
30+
|`command`|string|The command to send.|
31+
|`remoteWorkingDirectory`|string| |
32+
|`localCopyDirectory`|string| |
33+
|`remoteCopyDirectory`|string| |
34+
|`remoteCopyMethod`|string| Allowed values: "none", "sftp", "rsync"| |
35+
|`remoteCopySourcesOutputVerbosity`|string| Allowed values: "Normal","Verbose","Diagnostic".| |
36+
|`rsyncCommandArgs`|string|Defaults to "-t --delete"| |
37+
|`remoteCopyExclusionList`|array| |
38+
39+
## Launch properties
40+
41+
||||
42+
|-|-|-|
43+
|**Property**|**Type**|**Description**|
44+
|`command`|string| Specifies the full path of the process or script to launch.|
45+
|`args`|array| Specifies a comma-separated list of arguments passed to the command.|
46+
|`launchOption`|string| Allowed values: "None", "ContinueOnError","IgnoreError". Specifies how to proceed with the command invoke when there are errors.|
47+
|`workingDirectory`|string| Specifies the directory in which the command will run. Defaults to the project's current working directory.|
48+
|`customLaunchCommand`|string| Specifies a global scope customization to apply before executing the command. Useful for setting environment variables like %PATH%.|
49+
|`customLaunchCommandArgs`|string| Specifies arguments to customLaunchCommand. (Requires `customLaunchCommand`|
50+
|`envVars`|object| Specifies a key-value list of custom environment variables, for example "myEnv": "myVal"|
51+
|`commands`|array| Specifies a list of commands to invoke in order.|
52+
53+
## MSBuild properties
54+
55+
||||
56+
|-|-|-|
57+
|**Property**|**Type**|**Description**|
58+
|`verbosity`|string| Specifies the MSBuild project build output verbosityAllowed values: "Quiet", "Minimal", "Normal", "Detailed", "Diagnostic".|
59+
|`toolsVersion`|string| Specifies the toolset version to build the project, for example "2.0", "3.5", "4.0", "Current". Defaults to "Current".|
60+
|`globalProperties`|object|Specifies a key-value list of the global properties to pass into the project, for example, "Configuration":"Release"|
61+
|`properties`|object| Specifies a key-value list of additional project only properties.|
62+
|`targets`|array| Specifies the list of targets to invoke, in order, on the project. The project's default target is used if none are specified.|

‎docs/build/tasks-vs-json-schema.md‎

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)