Configure your Project for 32 bit and 64bit

TX Text Control .NET is shipped with separate sets of distributable files developed and compiled for 32bit and 64bit processors. To create a 64bit application, the project must be compiled with an x64 build configuration. To create an application that runs on both 32bit and 64bit platforms, the project must be compiled with an x86 build configuration. This article explains how to create two different build configurations with Visual Studio 2005.

1. Create a Visual Studio project as described in the tutorial.

2. Open the Configuration Manager dialog by choosing Configuration Manager from the Build main menu.

3. Select the <New...> item from the Active solution platform dropdown box to open the New Solution Platform dialog.

4. Confirm the settings in the dialog by clicking OK. A new configuration for x64 is created.

5. Repeat step 3 and 4 for an x86 configuration. The Active solution platform dropdown box of the Configuration Manager dialog box should now look like this:

6. Select <Edit...> from the dropdown box to open the edit Solution Platforms dialog.

7. Select Any CPU and click Remove to remove this configuration.

8. Close both dialogs by clicking Close.

The Solution Platform dropdown box of Visual Studio should now look like this:

To compile your application for a specific processor, choose the appropriate platform from this toolbox.

In Visual Studio 2005, a project is automatically compiled for 'Any CPU'. When loading a .NET assembly, the .NET Framework decides which version of the CLR (Common Language Runtime) must be loaded based on the assembly type. System processes based on assemblies compiled for 'Any CPU' will load in the native CLR for the host system. Therefore a TX Text Control application compiled for 'Any CPU' only runs on 32bit systems.