Products Technologies Demo Docs Blog Support Company

.NET Licensing: How to Use the Licenses.licx File?

The .NET licensing mechanism uses a licenses.licx file to record licensed controls like TX Text Control. Visual Studio invokes the License Compiler (lc.exe) at build time to embed the license string into the executable assembly, including when the control resides inside a user control.

.NET Licensing: How to Use the Licenses.licx File?

In order to deploy an application with licensed components like TX Text Control, the EXE file must be licensed properly.

Very often, we are getting requests about this mechanism of the .NET Framework that shows the confusion about it. This article explains how .NET includes the licenses of licensed controls into the exeutables.

The .NET licensing mechanism recommends to add the licenses to the EXE - the calling assembly. What happens in detail?

If you drag and drop a TextControl from the Visual Studio toolbox to a form, Visual Studio creates a licenses.licx file and includes the license information. This file is located in the same folder like your project file.

Important: The licenses.licx file does not include the license string itself. It just contains information about the licensed components. In case of TX Text Control (TXTextControl.TextControl), the following string is addded:

TXTextControl.TextControl, TXTextControl, Version=15.0.700.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638

As you can see, it contains the namespace and control name, the assembly version, culture information and the unique public key token. Based on that information, the License Compiler (lc.exe) compiles the real license string that will be embedded into the executable assembly. The lc.exe is a small utility of the .NET Framework SDK which is used by Visual Studio during the build process.

Text Control

What if I am using TX Text Control in a user control?

In this case, you need to add the license to the main executable as well. Therefore, you can simply drag and drop a TextControl to a dummy form of the main project, so that the licenses.licx file and the references are added automatically.

After that, you can remove the TextControl from that form again. Or you can simply copy or create a licenses.licx file to the main project folder. In this case, you need to add a reference to TX Text Control manually as well.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

AIC#Chat

Running a Local LLM in .NET C# with TX Text Control AI

Build an interactive .NET C# console chat with TX Text Control AI. Download a GGUF model, stream local replies through IChatClient, and retain conversation history without an OpenAI account or API…


ASP.NETASP.NET CoreLicensing

Against the Trend: Why We Still Believe in Transparent, Perpetual Software…

Software licensing is a complex topic, and the industry has been shifting toward subscription-based models. However, we believe transparent perpetual licensing offers significant advantages to…


ASP.NETASP.NET CoreLicensing

Unlock the Full Value of Your TX Text Control License

Are you getting the most from your TX Text Control license? In addition to document editing, your license includes powerful technologies for document generation, PDF processing, digital…


C#Linux.NET

Check TX Text Control Template Dependencies Before Deployment

When templates are moved from Windows to Linux, from TX Text Control Classic to Core, or from one server to another, missing fonts, images, merge fields, blocks, and form field names can break…


ASP.NET CoreC#MailMerge

Create 100,000 Documents in Under an Hour with Parallel MailMerge in .NET C#

The DocumentServer.ParallelMailMerge NuGet package makes it simple to process MailMerge jobs in parallel worker processes. This article shows when to use it, how to call it, and how worker counts…

Share this blog post on: