title: Any CPU - Prefer 32 bit
body: <p>What does the Any CPU - Prefer 32 bit option do?</p>
  <p>While I am aware that WinRT can not handle exe and can only run Windows Store apps, there are several questions <a href="https://stackoverflow.com/questions/12066638/what-is-the-purpose-of-the-prefer-32-bit-setting-in-visual-studio-2012-and-how">exist</a> on <a href="https://stackoverflow.com/questions/7508965/what-does-the-prefer-32-bit-compiler-flag-mean-for-visual-studio-11-managed-ap">StackOverflow</a> that ask the same question and both reference this <a href="http://blogs.microsoft.co.il/blogs/sasha/archive/2012/04/04/what-anycpu-really-means-as-of-net-4-5-and-visual-studio-11.aspx" rel="noreferrer">blog</a> that says:</p>
  <blockquote>
  <p>In .NET 4.5 and Visual Studio 11 the cheese has been moved. The default
  for most .NET projects is again AnyCPU, but there is more than one
  meaning to AnyCPU now. There is an additional sub-type of AnyCPU, “Any
  CPU 32-bit preferred”, which is the new default (overall, there are
  now five options for the /platform C# compiler switch: x86, Itanium,
  x64, anycpu, and anycpu32bitpreferred). When using that flavor of
  AnyCPU, the semantics are the following:</p>
  <ul>
  <li>If the process runs on a 32-bit Windows system, it runs as a 32-bit
  process. IL is compiled to x86 machine code.</li>
  <li>If the process runs on a 64-bit Windows system, it runs as a 32-bit
  process. IL is compiled to x86 machine code.</li>
  <li><strong>If the process runs on an ARM Windows system, it runs as a 32-bit process. IL is compiled to ARM machine code.</strong></li>
  </ul>
  </blockquote>
  <p>However, after purchasing my Surface RT, I created a Hello World program, set it to Any CPU, checked the Prefer 32 Bit flag, compiled and copied it to my Surface. When I ran the program the OS told me that it could not run the program and that I should look to the marketplace as it would for any x86/x64 exe. The exact message displayed was: &quot;This app can't run on your PC. To find apps for this PC, open the Windows Store.&quot;</p>
  <p>So what does this actually do and is it possible to compile an Any CPU application for Window RT on ARM?</p>