Q:

How to pass ASPNETCORE_ENVIRONMENT variable to a gulp task in VSO build template

I have a build template in VSO with a GULP task and it executes perfectly.
The problem is that passing an environment variable (set in build variables) is not working for me. I try to pass variable using argument: 
"--environment=%ASPNETCORE_ENVIRONMENT%"
To work with arguments inside a gulp file I'm using  "gutil = require('gulp-util')" and the value is surprisingly "%ASPNETCORE_ENVIRONMENT%". Any idea?

A:

The proper syntax to "inject" variable in Task is "$(ASPNETCORE_ENVIRONMENT)".
https://www.visualstudio.com/cs-cz/docs/build/define/variables

