I'm using Visual Studio 2010 to build a c# project that has both x86 and x64 targets. When I build using the IDE, I get the correct result of x64 and x86 targets.
When I use msbuild on the command line, I get everything built in x86, even though i specify x64 on the command line.
I didn't have this problem until I upgraded from .Net 4.0 to .Net 4.5.
With .Net 4.0 I was able to get my x64 targets even if I specified x86 on the command line.
I did a build in the .Net 4.0 environment and then another build in the .Net 4.5 environment and piped the output into log files. I noticed some differences in the log files but I think this is what is causing my issue:
In .Net 4.0 I see this line in the log file:
/reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll
In .Net 4.5 I see this line in the log file: /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Microsoft.CSharp.dll"
Any ideas? It seams .Net 4.5 is using an x86 specific path.
Building solution configuration "Debug|x64"? How do you understand that results incorrect? Which output directories are created -bin\x86\Debugorbin\x64\Debug?