Products Technologies Demo Docs Blog Support Company

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 how to migrate existing applications to the new licensing mechanism.

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

In Service Pack 2, we have made a number of significant changes and improvements in a variety of areas, including the licensing mechanism.

Say Goodbye to licenses.licx

For years, Microsoft supported a licensing scheme for third-party components like TX Text Control. This mechanism used a license file named licenses.licx to compile licensed components into the assembly using the license compiler (lc.exe) that is part of the .NET Framework. It takes a text file containing licensing information and creates a binary file to embed as a resource in a common language executable.

This license compiler is no longer available in .NET 6 and later versions. To support .NET, we used this as an opportunity to redesign the licensing mechanism and change other related parts. This change applies only to .NET-based applications. Applications that are based on the .NET Framework will continue to use the licenses.licx approach because it is fully supported by Microsoft.

New License File

The NuGet packages have been updated to be compatible with .NET 6 and better. The libraries in the package are now .NET 6 target libraries. When TX Text Control is added to a project using one of the NuGet packages, a new license file is added:

NuGet Packages

The name of the license file varies depending on the product added:

  • TXTextControl.TextControl.ASP.SDK
    txtextcontrol.server.license
  • TXTextControl.TextControl.WinForms.SDK
    txtextcontrol.winforms.license
  • TXTextControl.TextControl.WPF.SDK
    txtextcontrol.wpf.license

Since this file is an embedded resource, the license will be automatically embedded into the assembly during compilation.

Important

The license file is generated and contains private, encrypted serial number information unique to each installation. The license file may not be passed on to other users, nor may it be distributed in any form.

Entry Assembly

As of 32.0 SP2, TX Text Control can be used in class libraries and called from other unlicensed assemblies. In previous versions of TX Text Control, the license must have been compiled into the main calling assembly. The new static property EntryAssembly has been introduced to allow you to specify where TX Text Control should look for the license.

The following code shows how a Class Library that contains the TX Text Control license can be called from other assemblies without a reference to TX Text Control and without a license.

namespace MyClassLibrary
{
  public class Class1
  {
    public Class1()
      {
        TXTextControl.ServerTextControl.EntryAssembly = typeof(Class1).Assembly;
      }
    }
}

The assembly setting defines where TX Text Control looks for the license. In the above example, the class library itself contains the license, and TX Text Control will look for the license in the class library.

This allows another assembly to call members that use TX Text Control without a reference or license to TX Text Control. The following screenshot shows a console application with a project reference to the class library.

NuGet Packages

Typical Use Cases

There are two typical use cases for the new licensing mechanism:

  1. TX Text Control is used in a class library that is called from other assemblies.
  2. Class libraries that use TX Text Control should be tested using test frameworks such as NUnit or MSTest.

    Learn More

    Unit testing is a common practice in which code is tested in isolation. This article shows how to use TX Text Control .NET 32.0 in such environments, and in particular how to handle licensing.

    Unit Testing with NUnit and MSTest and TX Text Control .NET 32.0

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

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.NETWindows FormsWPF

TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version

TX Text Control 33.0 Service Pack 3 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…


ASP.NETWindows FormsWPF

TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version

TX Text Control 33.0 Service Pack 2 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…


ASP.NETWindows FormsWPF

Document Lifecycle Optimization: Leveraging TX Text Control's Internal Format

Maintaining the integrity and functionality of documents throughout their lifecycle is paramount. TX Text Control provides a robust ecosystem that focuses on preserving documents in their internal…


ActiveXASP.NETWindows Forms

Expert Implementation Services for Legacy System Modernization

We are happy to officially announce our partnership with Quality Bytes, a specialized integration company with extensive experience in modernizing legacy systems with TX Text Control technologies.