When I create a new WPF application in Visual Studio 2012 the platform target and build configuration is set to x86 by default. Why is this the case? For a plain WPF application (without any references to mixed mode assemblies) is there any danger using AnyCPU so my WPF executable will be JITed to x64 code on my x64 machine and to x86 on a x86 machine?
Share
For most applications, building as 32bit is actually better. 64bit provides few benefits, and some significant disadvantages in most cases (much higher memory usage, more complex dependency management with multiple platforms, worse debugging experience, etc).
If, however, your application needs to be able to use large amounts of memory, then of course 64bit has advantages (and is easy to switch in VS), but most applications do not fall into this boat.
This is why the new default in VS 2012 is to use
AnyCPUPrefer32Bitinstead ofAnyCPUfor applications.