# Publishing .NET Applications

> Publish a .NET 8 or higher Windows Forms app with TX Text Control in Visual Studio or dotnet publish: target runtime win-x64, publish folder and deployment.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for Windows Forms > Deployment Guide > Publishing .NET Applications
- **1161 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/dotnet/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/dotnet/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/dotnet/llms-full.txt

---

A Windows Forms application for .NET 8 or higher that references `TXTextControl.TextControl.WinForms.SDK` is published like any other .NET application. **Publish** in Visual Studio, or `dotnet publish` on the command line, collects your application, the assemblies of TX Text Control and the native libraries of one platform in a single folder, and that folder is what you deploy.

### Before You Begin

- The project references `TXTextControl.TextControl.WinForms.SDK` 34.0.5; see [Package Overview](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/nuget/packages/llms-full.txt).
- You know the platform you publish for, x64 or x86; see [x86, x64, and AnyCPU](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/x86-x64-anycpu/llms-full.txt).
- The application builds with your licensed package, not with a trial; see [Application Licensing](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/licensing/llms-full.txt).

### Publish With Visual Studio

1. In **Solution Explorer**, select the project, and choose **Build** > **Publish Selection** from the main menu.
2. Select **Folder** as the target, and click **Next**:

    ![The Publish dialog of Visual Studio asking where you are publishing today, with the targets Azure, ClickOnce, Docker Container Registry and Folder, and Folder selected.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-winforms/vs-publish-target-folder.d4f0cbfc.webp)
3. Select **Folder** again as the specific target, and click **Next**.
4. Choose the folder location, and click **Finish**. Visual Studio creates a publish profile.
5. Click **Show all settings** to open the publish settings.

    ![The Publish tab of Visual Studio with the folder profile FolderProfile.pubxml ready to publish, its settings Target location, Configuration Release and Target runtime Portable, and the link Show all settings circled.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-winforms/publish-show-all-settings.85c3c802.webp)
6. Select `win-x64` as the **Target runtime**, or `win-x86` for a 32-bit application, and click **Save**.

    ![The Profile settings dialog of a Visual Studio folder publish profile with the configuration Release, the target framework net8.0-windows, the deployment mode Framework-dependent and the target runtime win-x64.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-winforms/vs-publish-target-runtime.2529cc17.webp)
7. Click **Publish**.

With the target runtime set, all files of TX Text Control that the application needs, including the native libraries and the filters for the file formats, are copied to the publish folder.

### Publish on the Command Line

The same publish with the .NET CLI, from the folder of the project:

```bash
dotnet publish -c Release -r win-x64 --self-contained false -o publish
```

The command works as follows:

- **`-c Release`** publishes the release build.
- **`-r win-x64`** selects the target runtime, which puts the 64-bit native libraries next to the executable. Use `win-x86` for a 32-bit application.
- **`--self-contained false`** creates a framework-dependent application, which runs with the .NET Desktop Runtime installed on the user's machine. With `true`, the publish folder also holds the complete .NET runtime.
- **`-o publish`** writes the output to the folder *publish*.

### What the Publish Folder Contains

For `win-x64`, the publish folder holds:

| Files | What they are |
|---|---|
| Your executable and its assemblies, such as *MyApp.exe* and *MyApp.dll* | Your application, with the TX Text Control license compiled in |
| *TXTextControl.dll*, *TXTextControl.Windows.Forms.dll*, *TXTextControl.Server.dll*, *TXDocumentServer.dll* and the other assemblies of the package | The managed assemblies |
| *tx34.dll*, *tx34\_rtf.dll*, *tx34\_pdf.dll* and the other native libraries | The 64-bit native libraries |
| A *de* folder | The German resources |

There is no license file among them: the license is part of your assembly. [Managed Assemblies and Native Libraries](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/assemblies/llms-full.txt) lists every file.

Publish to a folder and deploy the folder as it is. Single-file publishing isn't described for TX Text Control.

### Deploy the Folder

Copy the complete content of the publish folder to the user's machine: with your own installer, with a file copy or packaged as MSIX. On the user's machine, you need:

- **The .NET Desktop Runtime** of the version your project targets, for a framework-dependent application.
- **The Visual C++ runtime** of the same bitness as the application; see [Visual C++ Runtime Dependencies](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/vc-runtime/llms-full.txt).

Neither the NuGet package nor the setup of TX Text Control is installed there. When the application fails on the user's machine, see [A Published .NET Application Lacks the Native Libraries](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/deployment/#a-published-net-application-lacks-the-native-libraries).

### Next Steps

- [MSIX Packaging and Microsoft Store Deployment](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/msix/llms-full.txt): package the application for sideloading or the Microsoft Store.
- [CI/CD](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/ci-cd/llms-full.txt): publish on a build server.
- [Deploying .NET Framework Applications](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/dotnet-framework/llms-full.txt): deployment without the NuGet package.

---

## Nearby

- **Previous:** [x86, x64, and AnyCPU](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/x86-x64-anycpu/llms-full.txt)
- **Next:** [Deploying .NET Framework Applications](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/dotnet-framework/llms-full.txt)
