There are many ways to publish or deploy .NET applications created with TX Text Control. Previously, for .NET Framework applications, additional files required by TX Text Control had to be copied to the applications folder. But since .NET and the introduction of our NuGet packages, deployment has become much easier.

Other articles explain how to deploy applications using Docker or how to publish to Azure App Services, but this article focuses on the basics and explains how to publish to a folder that can simply be copied to a server.

Deploying using Docker?

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.

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

Preparing the Application

Assuming that you have already created an ASP.NET Core Web application using our Getting Started tutorials, this will guide you through the publishing process.

Getting Started

This article shows how to use the TX Text Control ASP.NET ServerTextControl and MailMerge classes within a .NET 6 application in Visual Studio 2022.

Getting Started: ServerTextControl and MailMerge with ASP.NET Core

If you take a look at the TX Text Control NuGet package in the Compile Time Assemblies, you will see the DLLs that need to be deployed when the application is published.

Deploying Applications with TX Text Control

In addition to these files, there are additional runtime files that must be deployed depending on whether you are deploying to 64-bit or 32-bit machines. These files are automatically selected based on the target runtime. TX Text Control currently supports win-x86 and win-x64 (Linux support is coming).

Adding a Publish Profile

  1. Right-click the project in the Solution Explorer and choose Publish. This will open the Publish dialog where you can create a new profile.

  2. Choose Folder as the publish target and click Next.

    Deploying Applications with TX Text Control

  3. Select a folder where you want to publish the application. This can be a local folder or a network share. Click Finish to create the profile.

  4. Choose Close to close the dialog.

Selecting the Target Runtime

  1. After closing the dialog, the created publishing profile should be selected. Click the Show all settings link to open the Publish dialog box.

    Deploying Applications with TX Text Control

  2. Select either win-x86 or win-x64 as the Target Runtime and click Save.

    Deploying Applications with TX Text Control

Publishing the Application

  1. Click the Publish button to start the publishing process.

  2. When the process is finished, the selected folder will contain the published application. You can use the Copy to clipboard button to copy the path to the folder.

    Deploying Applications with TX Text Control

  3. When you open the folder in Windows Explorer, you will see that all the necessary files have been copied automatically.

    Deploying Applications with TX Text Control

Deploying to a Server

Copy the published folder to the server where you want to deploy the application. Make sure that the server has the required .NET runtime installed. The TX Text Control NuGet package is not required on the server because all required files are included in the published folder. TX Text Control also requires the Microsoft Visual C++ Redistributable for Visual Studio 2017, 2019, and 2022.

After copying the folder to the server, you can start the application by running the executable file. The application will start and the TX Text Control components will be loaded automatically.