TX Text Control .NET for Windows Forms

32-bit and 64-bit Applications

Topic

TX Text Control consists of .NET assemblies and native Windows libraries, and the native libraries exist twice: once for 32-bit and once for 64-bit processes. Whether your application runs as a 32-bit or a 64-bit process therefore decides which libraries it loads and ships. Read on to choose a build configuration and to set it up in Visual Studio.

Why Bitness Matters

The .NET assemblies of TX Text Control are the same for both, but the native libraries are compiled separately for 32-bit and 64-bit processors:

32-bit (x86)64-bit (x64)
NuGet packageruntimes/win-x86/nativeruntimes/win-x64/native
Setup (.NET Framework)Assembly\binAssembly\bin64

Your application needs the set that matches the bitness of the process it runs in. The 64-bit version is part of all three editions.

A 64-bit application has more memory available, so it can open and save much larger documents than a 32-bit one.

Choose a Build Configuration

ConfigurationRuns asNative libraries
x64A 64-bit processThe 64-bit set
x86A 32-bit process, on 32-bit and on 64-bit WindowsThe 32-bit set
AnyCPUA process with the bitness of the Windows it runs onThe set that matches the host: the 32-bit set on 32-bit Windows, the 64-bit set on 64-bit Windows
  • x64 is the configuration for a 64-bit application.
  • x86 is the configuration for an application that has to run on both 32-bit and 64-bit Windows.
  • AnyCPU, the default of new Visual Studio projects, works if you deploy the set of native libraries that matches the machine your application runs on.

The sample programs installed by the setup have an x86 and an x64 configuration.

Create x86 and x64 Configurations in Visual Studio

  1. Open your project and choose Build > Configuration Manager.

  2. In the Active solution platform list, select <New...>. The New Solution Platform dialog opens.

    The Visual Studio Configuration Manager dialog with the Active solution platform list open, showing Any CPU, New and Edit.

  3. Select x64 and click OK.

    The New Solution Platform dialog with x64 selected as the new platform and settings copied from Any CPU.

  4. Repeat steps 2 and 3 for x86. The Active solution platform list now holds Any CPU, x64 and x86:

    The Active solution platform list of the Configuration Manager with Any CPU, x64 and x86 above the New and Edit entries, x86 selected.

  5. Optionally, remove Any CPU: select <Edit...> in the Active solution platform list, select Any CPU, click Remove and close the dialog.

  6. Close the Configuration Manager.

To compile for one of the platforms, select it in the Solution Platforms list of the Visual Studio toolbar.

The Solution Platforms list of the Visual Studio toolbar next to the Debug configuration, with x64, x86 and Configuration Manager.

Publishing .NET Applications

When you publish a .NET 8 or higher application with Build > Publish Selection, you select the target runtime in the publish settings, for example win-x64. The publish process copies the TX Text Control files for that runtime to the output folder. Publishing .NET Applications describes the steps.

The native libraries also need the Microsoft Visual C++ runtime of the same bitness. See Visual C++ Runtime Dependencies.