TX Text Control .NET for Windows Forms

Build Servers

Topic

Build servers and CI/CD pipelines compile applications with TX Text Control .NET for Windows Forms without a developer license of their own. What they need is access to the licensed NuGet package, and the credentials for it must stay out of source control. The license rules, the two ways to give a build server the package and the notes for .NET Framework builds follow below.

License Rules for Build Servers

A build server needs no developer license of its own, as long as every developer who works with TX Text Control is licensed and the build environment is not used for interactive development. You may also mirror the packages in an internal feed for your licensed developers and build systems. Developer Licenses states the rules.

Restore the Package From the Private Feed

The Windows Forms package on the Text Control Private NuGet Feed is meant for this purpose: compiling on build servers and in CI/CD pipelines. The feed authenticates with the email address of a developer who has a license assigned and an API token. The license is in the package, so the build needs no further license step.

  1. Store three values as secrets of your CI/CD system: the email address as TEXTCONTROL_EMAIL, the API token as TEXTCONTROL_API_TOKEN and the feed URL https://www.textcontrol.com/nuget/v3/index.json as TEXTCONTROL_FEED_URL.
  2. In the pipeline, create nuget.config from the secrets before the restore. It has the same structure as the file you download, shown in Configuring Package Sources.
  3. Restore and build the project on a Windows build agent.

The credentials never reach your repository this way. API tokens expire, after 365 days for an automatically created token, so update the secret when the token is replaced.

The blog article Text Control Private NuGet Feed has pipeline configurations for GitHub Actions, GitLab, Azure DevOps, Jenkins, Bitbucket and TeamCity. Its samples build on Linux agents; a Windows Forms project is built on a Windows agent, such as windows-latest in Azure Pipelines.

Restore the Package From Your Own Feed

Instead of the private feed, a build can use your own feed, for example in Azure Artifacts, set up as described in Your Own Feed. In the pipeline, restore with the NuGetCommand@2 task and feedsToUse: 'config', then build with VSBuild@1 on a windows-latest agent. The blog article Azure Pipelines with TX Text Control .NET for WPF and Windows Forms 32.0 with Azure DevOps and Artifacts shows the complete pipeline. Since version 32.0 with Service Pack 2, a .NET project needs no precompiled license for this.

.NET Framework Projects

A .NET Framework project gets its license from licenses.licx and the license compiler, which needs the TX Text Control assemblies of the installation. On a hosted build agent, where the setup cannot be installed, Text Control's articles compile the license once on a development machine with the license compiler lc.exe and add the result to the project as an embedded resource. The /i option of lc.exe has to name the full path of each assembly in the installation folder. The blog article Version 30.0: Changes in Licenses.licx describes the command.