Today I had a bit of a struggle with the JenkinsEnvInject Plugin while trying to inject custom variables from a properties file into my MSBuild step. Everything that I added to the Properties Content field was successfully injected, and looking at the log, the EnvInject reported successfully injecting my file envVars.properties variables as well.

I used PowerShell to retrieve the current Git branch and echoed it into the envVars.properties file shown in the image above, which also turned out to be the culprit.