Visual Studio “Any CPU” == MSBuild “AnyCPU”

Notice the difference in spacing. You select a build platform named “Any CPU” in Visual Studio 2010 (which is automatically created with your solution), but to target that platform when using msbuild.exe from the command line (or from Nant, or whatever), be sure to leave the space out, and use /p:AnyCPU. If you are using…