32-bit and 64-bit Applications
Behind the WPF controls of TX Text Control .NET for WPF works a document engine made of native Windows libraries, and those libraries are compiled twice: for 32-bit and for 64-bit processes. A WPF application therefore has to be built for the bitness it runs with and ship the matching set of libraries. The build configurations to choose from, and how to create them in Visual Studio, are explained below.
Why Bitness Matters
The managed assemblies, such as TXTextControl.WPF.dll, are the same for 32-bit and 64-bit processes. The native libraries, such as tx34.dll, exist in a 32-bit and a 64-bit set, and your application needs the set that matches the bitness of the process it runs in. Native Libraries in the Deployment Guide lists the files and the folders of the NuGet package and the setup that hold each set.
Choose a Build Configuration
| Configuration | Runs as | Native libraries to deploy | Target runtime for .NET |
|---|---|---|---|
| x64 | A 64-bit process | The 64-bit set | win-x64 |
| x86 | A 32-bit process, on 32-bit and 64-bit Windows | The 32-bit set | win-x86 |
| AnyCPU | A process with the bitness of the Windows it runs on | The set that matches the host: the 32-bit set on 32-bit Windows, the 64-bit set on 64-bit Windows | Chosen per target machine |
- x64 creates a 64-bit application, which has more memory for large documents.
- x86 creates an application that runs on both 32-bit and 64-bit Windows.
- AnyCPU is what Visual Studio sets for a new project. It works when the set of native libraries you deploy matches the machine the application runs on.
The sample projects that the setup installs come with an x86 and an x64 build configuration.
Create x86 and x64 Configurations in Visual Studio
Open your WPF project and choose Build > Configuration Manager.
In the Active solution platform list, select <New...>.

In the New Solution Platform dialog, select x64 and click OK.

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

To remove Any CPU, select <Edit...> in the Active solution platform list, select Any CPU, click Remove and close the dialog.
Close the Configuration Manager.
The platforms are now in the Solution Platforms list of the Visual Studio toolbar. Select one before you build to compile for it:

Publish a .NET Application for One Platform
A .NET 8 or higher application is published with Build > Publish Selection. In the publish settings, you select the target runtime, for example win-x64, and 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 in the same bitness. See Visual C++ Runtime Dependencies.