Solved by changing the CMD environment.
Adding C:\Windows\system32\config\systemprofile\AppData\Local\Temp\ did not help me.
And C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Tempβ too. Moreover, after adding the \ Temp folder to \ SysWOW64 ... I was forced to use MSBuild x64 due to a new strange error VBCSCompiler.exe causes CSC: error CS2001: Source file ... could not be found
Also I can not use MSBuild x64 all the time.
I cannot use MSBuild x64 through DevEnv.com to create Visual Studio installation projects. DevEnv only allows x32 MSBuild.
Hope I found a fun way to solve all these errors.
I changed the profile folder for CMD calls by overriding CMD environment variables such as AppData and others.
Here is the full and working version - MSBuild-File-System-Redirector-fail-System32-to-SysWOW64
And sorry, but you cannot use it without a wrapper invoking MSBuild and DevEnv batch file . Or from this answer .
it3xl
source share