Microsoft Redefines AnyCPU for Visual Studio 11 and .NET 4.5
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:
On VS 2010, these options are:
- x86 (default)
Now Microsoft is making changes and with VS 11 and .NET 4.5 the available options are:
- 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).
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.
Dmitriy Khmaladze and Leonid Ganeline Oct 08, 2015
Jan Stenberg Oct 06, 2015