First I'll point out that your set
command misspells the envvar name. So if you copied this from your script then you should fix your script and try again.
For issues related to MSBuild you should report them in Github where the dev team can look at the issue and either help you get it working or identify it as a bug to be resolved.