Share via


How to: Optimize an Application for a Specific CPU Type

Note

The Visual Studio Express Editions, such as Visual C# Express Edition, do not support optimization for a specific CPU type. This is supported only in the full Visual Studio product.

The Target CPU (Platform target in C#) project property specifies whether the compiler should optimize compilation for a specific CPU type, for example, a 64-bit processor. You can set the target platform to all CPU types or to a specific CPU type of x86, x64, or Itanium. By default, this option is set to AnyCPU (Any CPU in C#), which specifies that the compiler should not optimize compilation for a specific CPU type.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

To set the Target CPU property (Visual Basic)

  1. With a project selected in Solution Explorer, on the Project menu, click Properties.

  2. Click the Compile tab.

  3. Click the Advanced Compile Options button to open the Advanced Compiler Settings dialog box.

  4. Choose a CPU type from the Target CPU list. The options are AnyCPU (the default), x86, x64, and Itanium. Click OK.

To set the Platform target property (C#)

  1. With a project selected in Solution Explorer, on the Project menu, click Properties.

  2. Click the Build tab.

  3. Choose a CPU type from the Platform target list. The options are Any CPU (the default), x86, x64, and Itanium.

See Also

Reference

Advanced Compiler Settings Dialog Box (Visual Basic)

Other Resources

Managing Compilation Properties

Change History

Date

History

Reason

September 2009

Added note about the Visual Studio Express Editions.

Customer feedback.