I am new to MSBuild, so I could be doing something obviously wrong, but my colleague who worked a lot with MSBuild does not see any error, so I decided that I would post it and see if anyone else could see it.
I convert the old batch file that we used to call antinto MSBuild tasks (because we want to name it from MSBuild), and the environment variables are always expanded to )for reasons we don’t understand.
I have a property group that includes
<PropertyGroup>
<EnvJavaHome>
$([System.Environment]::GetEnvironmentVariable("JAVA_HOME"))
</EnvJavaHome>
</PropertyGroup>
(line breaks added for readability). Now the link to MSBuild Property Properties link assumes that I call System.Environment.GetEnvironmentVariable , but I always get the value ). The code works fine when I hard code the value.
What obvious thing am I missing ?: O)
source
share