Returns the environment variable specified cast to type T. A CakeException will be thrown if environment variable not found.
CakeException
var buildNumber = EnvironmentVariable<int>("BUILD_NUMBER");
Returns the environment variable specified cast to type T. The defaultValue will be returned if environment variable not found.
var buildNumber = EnvironmentVariable<int>("BUILD_NUMBER", 1);