Visual Studio 2013 and Update 2 (Intermittent Build Errors)

I solved this by replacing C:\Program Files (x86)\MSBuild\12.0\Bin with C:\Program Files (x86)\MSBuild\12.0\Bin\amd64


I was getting exactly the same behaviour after installing VS 2013 Update 2, but not when compiling directly from inside Visual Studio. I got these errors when using msbuild in our separate build scripts (a collection of Windows "bat" files). These scripts were using

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

Luckily, the path to this program is configurable for all of our scripts in a single place (by using some kind of include mechanism). I exchanged it by

C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe

and now everything seems to be fine. The latter "MSBuild.exe" seems to be a newer version which was installed as part of the "Upgrade 2", the former is the version belonging to .NET framework 4.

I also tried the amd64 version mentioned by @J.J.Hashemi, but it gave me some nasty warnings about the processor architecture of some framework DLLs not matching my target architecture.