I am using Visual Studio 2010 to create a C # project that has both x86 and x64 goals. When I build using the IDE, I get the correct result from x64 and x86 targets.
When I use msbuild on the command line, I get everything that was built into x86, although I specify x64 on the command line.
I did not have this problem until I upgraded from .Net 4.0 to .Net 4.5.
With .Net 4.0, I managed to get my x64 targets, even if I specified x86 on the command line.
I made a build in .Net 4.0, and then another build in .Net 4.5, and sent the output to the log files. I noticed some differences in the log files, but I think this is what causes my problem:
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 uses a specific x86 path.
source share