BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Redefines AnyCPU for Visual Studio 11 and .NET 4.5

Microsoft Redefines AnyCPU for Visual Studio 11 and .NET 4.5

This item in japanese

Since the introduction of 64-bit computing, developers have had to manage the differences between 64-bit and 32-bit platforms. Microsoft provides C# developers on Visual Studio with the AnyCPU compiler setting. This setting allows developers to specify which common language runtime platform should be targeted, and the change will support the ARM architecture by default.

The following screenshots illustrate the changes:

Visual Studio 2010

On VS 2010, these options are:

  • x86 (default)
  • Itanium
  • x64
  • anycpu

Visual Studio 11

Now Microsoft is making changes and with VS 11 and .NET 4.5 the available options are:

  • x86
  • Itanium
  • x64
  • anycpu
  • anycpu32bitpreferred (default)

AnyCPU, 32 Bit is the new default under VS11. As developer and Microsoft MVP Sasha Goldshtein has noted, this is contrary to what VS11 displays on the project's properties screen (which shows AnyCPU as the default and does not allow AnyCPU, 32-bit to be selected).

 

Goldshtein comments: 

The difference, then, between “Any CPU 32-bit preferred” and “x86” is only this: a .NET application compiled to x86 will fail to run on an ARM Windows system, but an “Any CPU 32-bit preferred” application will run successfully."

Developers migrating should be sure to review their project properties as they migrate to VS11 so that they are targetting their intended platforms.

 

Rate this Article

Adoption
Style

BT