TX Text Control .NET for Windows Forms

Deployment

Topic

An application that runs on your development machine can fail on the machine of a user when files of TX Text Control are missing or in the wrong place. No message names the missing file in these cases, so the problems below start from how the application was deployed. An application that fails because of the bitness, the Visual C++ runtime or a native library is covered on Native Libraries and Architecture Mismatches, and a license error after deployment on Licensing.

Files Are Missing After Deploying a .NET Framework Application

The application starts on your machine, but on the target machine it fails as soon as the TextControl is created, or it can't load or save some formats.

A .NET Framework application references the assemblies of the setup, and all files of TX Text Control that it needs must be deployed with it, at the same level as the executable. Missing native libraries, a set of the wrong bitness or files in subfolders cause this failure.

  1. Compare the application folder on the target machine with Put All Files Into the Application Folder, and copy what is missing.
  2. If your application uses the XML features of TX Text Control, make sure the Microsoft XML parser is installed, as Other Windows Components describes.

A Published .NET Application Lacks the Native Libraries

A .NET 8 or later application that you published fails on the target machine, while it runs from Visual Studio.

The package TXTextControl.TextControl.WinForms.SDK contains the native libraries of TX Text Control for 32-bit and 64-bit Windows. Only a publish with a target runtime copies all required files, including the binary filters of TX Text Control, next to the executable.

  1. Publish again with the target runtime win-x64 or win-x86, as Publishing .NET Applications shows.
  2. Deploy the complete content of the publish folder.

An Installer Doesn't Include the Files of TX Text Control

An installer or a ClickOnce package that you build yourself installs your application, but the application fails on the target machine.

An installer that lists the files by hand has to list every file of TX Text Control, including the native libraries. Since version 33.0, some of these files have new names: TXSVGResources.dll replaces TXSVGGenerator.dll, and the native libraries txkernel.dll, txtools.dll and txic.dll are named after the version, such as tx34.dll, tx34_tls.dll and tx34_ic.dll in version 34.0. A project that references the NuGet package gets the new names automatically; a file list doesn't.

  1. Compare the file list of your installer with the files of the version you ship. For .NET applications, take the files from the publish folder.
  2. Update the names in the file list after each major version, as Breaking Changes describes.
  3. For a ClickOnce package of a .NET Framework application, add the native libraries to the project and include them in the publish, as Deploy With ClickOnce describes.

An MSIX Package Runs With Limited Access

An application packaged as MSIX with partial trust can't reach files or other resources that it can reach when it runs unpackaged.

With the trust level Partial Trust, the Windows Application Packaging Project runs the application in an AppContainer, which limits its access to resources until you allow them.

  1. Enable the resources your application needs on the Capabilities tab of Package.appxmanifest, as Run the Application in an AppContainer shows.
  2. Build and install the package again.