Wednesday, September 18, 2013

AnyCPU in Visual Studio 2012

The default setting for .NET projects in Visual Studio 2012 is AnyCPU. But this AnyCPU differs from you've probably seen earlier - in previous versions of Visual Studio. If you run your application on 64-bit machine you will see it runs as 32-bit process!

Actually the default configuration is not AnyCPU but AnyCPU 32-bit preferred. With this configuration IL is compiled to x86 machine code on both 32-bit and 64-bit Windows machines. If you want to change this to old-style AnyCPU, there is a checkbox "Prefer 32-bit" in Project Settings which you may uncheck.

AnyCPU 32-bit preferred is the same as x86 now - the only difference it can be launched successfully on ARM Windows.

More details can be found here:

No comments:

Post a Comment