BT

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

Bookmarks

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

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.