Products Technologies Demo Docs Blog Support Company

TX Text Control .NET Licensing Explained

This article should help you, if you get the following error message in Visual Studio: The following control could not be licensed: TXTextControl.TextControl This means that .NET is not able to find an appropriate license to validate the control. Generally, the license will be automatically included into the application and typically, you don't have to worry about licensing at all. In case, you are dropping a TextControl object onto a Form, TX Text Control creates an entry in the…

TX Text Control .NET Licensing Explained

This article should help you, if you get the following error message in Visual Studio:

The following control could not be licensed: TXTextControl.TextControl

This means that .NET is not able to find an appropriate license to validate the control. Generally, the license will be automatically included into the application and typically, you don't have to worry about licensing at all. In case, you are dropping a TextControl object onto a Form, TX Text Control creates an entry in the licenses.licx file automatically.

However, should you wish to do one of the following, it is necessary to take a closer look at licensing:

  • Creating TextControl dynamically
  • Encapsulating TextControl in a user control
  • Updating an existing project with a newer version of TX Text Control

Creating TextControl Dynamically

Two significant steps are required in order to add the license of TX Text Control into an application. These steps must be performed when creating a TextControl instance dynamically:

  1. The project must include a reference to the used assembly (TXTextControl.dll and TXTextControl.Windows.Forms.dll, TXTextControl.Server.dll or TXTextControl.WPF.dll). To include the reference, select Add Reference... from the Project main menu in Visual Studio. Browse for the required assemblies, select them and confirm by clicking OK.

  2. A licenses.licx file must exist in the project. To build such a file, create a new text file in this folder and name it licenses.licx. Open the file and add one of the following strings, depending on which assembly you are using:

    Assembly Entry
    TXTextControl.WPF.TextControl TXTextControl.WPF.TextControl, TXTextControl.WPF
    TXTextControl.TextControl TXTextControl.TextControl, TXTextControl.Windows.Forms
    TXTextControl.ServerTextControl TXTextControl.ServerTextControl, TXTextControl.Server

    Set the Build Action to Embedded Resource.

The licenses.licx file is not a TX Text Control specific file, but a Visual Studio file that is used by lc.exe (which is part of the .NET SDK) to compile the licenses into the assembly.

Encapsulating TextControl in a User Control

If you wrap TextControl in a user control assembly, the license information must be in the calling application (exe). It is not enough that the user control contains a reference to TX Text Control core (TXTextControl.dll) and the specific platform assembly TXTextControl.Windows.Forms.dll, TXTextControl.Server.dll or TXTextControl.WPF.dll. The license must be compiled into the calling assembly.

Updating an Existing Project

Projects will be updated automatically, if only one version of TX Text Control is installed. If you have several versions of TX Text Control installed, perform the following steps:

  1. Load your Visual Studio .NET project.
  2. Open the Add Reference... dialog box in the Project... menu.
  3. Delete the reference to the current TX Text Control version.
  4. Add a reference to the new version and close the dialog box.
  5. Open the licenses.licx file of your project and change the version number of the referenced TX Text Control version to the version number of the newer TX Text Control version.
  6. Rebuild your project using the Rebuild Solution menu item.

Important: Do Not Change the Assembly Names After the Compilation

The license strings are embedded in the Resources section of the assemblies and if names are changed after the compilation, the licenses cannot be found anymore.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

Windows FormsGetting StartedTutorial

Windows Forms Tutorial: Create Your First Windows Forms C# Application

This tutorial shows how to create your first Windows Forms application with C# using TX Text Control .NET for Windows Forms in Visual Studio 2022.


Windows FormsLicensingMSIX

Secure and Deploy .NET Windows Forms Apps with MSIX AppContainer Apps

This article shows how to secure and deploy .NET Windows Forms apps with MSIX AppContainer apps. MSIX is a Windows application packaging format that provides modern packaging for all Windows…


ASP.NETWindows FormsWPF

Encapsulating TX Text Control in Class Libraries

This article describes how to encapsulate TX Text Control in class libraries. This is useful if you want to use TX Text Control in multiple projects and you want to avoid code duplication.


ASP.NETDockerGitHub

Creating an ASP.NET Core Web App with Docker Support and GitHub Packages

This article shows how to create an ASP.NET Core Web App with Docker support. The TX Text Control NuGet packages are hosted on GitHub Packages to get restored during the build process.


ASP.NETWindows FormsWPF

TX Text Control 32.0 SP2 Licensing Changes: Say Goodbye to licenses.licx

TX Text Control 32.0 SP2 has been released. This service pack includes a new licensing mechanism for all .NET based versions of TX Text Control. This article gives an overview of the changes and…