TX Text Control .NET for Windows Forms

Development Licenses

Topic

Every developer who works with TX Text Control .NET for Windows Forms has a license assigned, and that license has to end up in the projects they build. There are no activation dialogs and no license server: in .NET projects, the NuGet package carries the license, and in .NET Framework projects, Visual Studio's license compiler embeds it. Both ways are described below, from the assignment of a serial number to the entries of licenses.licx.

Assign a License to a Developer

Licenses are per developer. The owner of your Text Control account assigns a serial number to each developer:

  1. Sign in to the Text Control account and open Manage Products.
  2. Click Manage, then Assign next to the serial number.
  3. Enter the developer's email address and click Assign.

For a serial number that includes NuGet access, the developer receives an email with the serial number and a download link for a personal nuget.config file for the Text Control Private NuGet Feed. Licensing Overview explains who needs a license.

How the License Reaches Your Project

.NET 8 or higher.NET Framework
CarrierThe license file txtextcontrol.winforms.license in the NuGet packageEntries in the project's licenses.licx file
How it gets into the assemblyThe build embeds the file as a resourceThe license compiler builds the license from the entries and embeds it
What you doInstall the packageDrop a control on a form, or maintain the entries yourself

.NET 8 or Higher: The License File

The package TXTextControl.TextControl.WinForms.SDK contains the file txtextcontrol.winforms.license and adds it to your project as an embedded resource. When you build, the license is compiled into your assembly, and nothing else is needed: since version 32.0 with Service Pack 2, .NET projects use no licenses.licx file.

  • From the private feed, each developer receives the package with their own license already in it, and only in the versions their serial number covers.
  • From Text Control Offline Packages, the package comes with the license of the setup you installed.

The license file contains encrypted serial number information that belongs to your installation. Do not give it to others and do not distribute it, for example by committing it to a public repository or shipping it with your application.

.NET Framework: licenses.licx

In a .NET Framework project, the license is described in licenses.licx, a Visual Studio file. When you drop a TextControl or another TX Text Control control on a form, Visual Studio adds an entry for it. When you build, the license compiler reads the entries and embeds the licenses into your assembly. The file itself contains no license, only the names of the licensed components.

Since version 30.0, the assemblies are no longer registered in the global assembly cache, and each entry has to contain the full assembly version. An entry of version 30.0 looks like this:

TXTextControl.TextControl, TXTextControl.Windows.Forms, Version=30.0.1500.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638
  • Use the version of the assemblies you reference. If an entry has no version or names an earlier one, an older installed version can be used and cause a licensing error.
  • Controls created in code need an entry as well. If no control was dropped on a form, add the reference to the assembly and a licenses.licx file with the entry, with its Build Action set to Embedded Resource.
  • When you upgrade to a new version, change the version in each entry. See Upgrading from Previous Versions.

If Visual Studio reports that a control "could not be licensed", .NET found no suitable license for it. Check the entries of licenses.licx first. Licensing in Troubleshooting has more.

The Trial Version

The trial setup needs no serial number, so no license is assigned. What it may be used for is described in Trial Version and Express Edition, and Check the Edition at Run Time shows how an application finds out that it runs as a trial.