Is there a way to define custom properties in task.json and consume those in the build task?
See original GitHub issueIs there a way to define a static custom property in task.json
and consume that in the associated (PowerShell) build task? This would not be a user editable input.
We have multiple TFS environments and the property of the task only needs to vary between environments. My thought is that at the point the task is uploaded, our deployment process could set the property in task.json
to the value specific to the environment. Or would you recommend an alternative approach?
Hope this makes sense. Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Tasks in Visual Studio Code
Select tsc: build or tsc: watch and VS Code will generate a tasks.json file. ... Sometimes it is necessary to define your own...
Read more >Customize build debug tasks with JSON files - Visual Studio ...
Learn how to customize tasks to provide some configuration details to run and debug a codebase that Visual Studio doesn't recognize.
Read more >Adding a property to tasks.json (without warning) · Issue #17566
Expected: Allows custom properties to be set in the file. Custom properties are just ignored by VSC when it consumes/configures the tasks.
Read more >VScode: Defining own variables in tasks.json - Stack Overflow
Adam Parkin's answer won't work because, at least on windows, the shell will not substitute environment variables given as arguments.
Read more >Task definition parameters - Amazon ECS - AWS Documentation
The family and container definitions are required in a task definition. ... You can use these parameters in a JSON file to configure...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@damccorm I ended up writing a separate config.json file which is read by the build step, The values in the config.json are modified by our deployment process that packages up the build step and pushes it to our TFS instances.
Well I think having it defined in the task.json would be nicer, either in its own config/options section or as an input with a default value that isn’t editable / hidden