How to pass variables between build/deploy tasks in a TaskGroup in VSTS 16.131.28601.4 I have a multi-configuration web application I'm using parallel deployments, leveraging Task Groups for reusing my deployment code.

I've been using Powershell tasks and the ##vso[task.setvariable variable] but those only are readable by other tasks (particularly non-PowerShell tasks) if they correspond to top-level variables at the Build/Release level.  Variables that are only local to the task-group.

Basically, the behavior described in Issue #3116

Does anybody have a better workaround for this issue besides binding all your variables right to the root with identical names?
I'm not sure my approach is any "better". However, what I have done in the past was to use Table Storage or Cosmos DB to store the key-value pairs that needed to be persisted between each stage.

The general schema was:


Key: buildNum-variableName 
Value: variableValue


I then created various wrappers for the SDK to access from PowerShell and MSBuild, this also enabled chaining multiple builds together to create a CI/CD pipeline.