# Publishing .NET Applications

> Publish a .NET 8 or higher WPF app with TX Text Control from Visual Studio or with dotnet publish: target runtime, framework-dependent output, publish folder.

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

---

Publishing turns a WPF project for .NET 8 or higher into a folder you can deploy. With `TXTextControl.TextControl.WPF.SDK` referenced, Visual Studio's **Publish** and the `dotnet publish` command copy the assemblies of TX Text Control and, for the target runtime you select, its native libraries next to your executable. Set the target runtime, and the folder is complete.

### Before You Begin

- The WPF project references `TXTextControl.TextControl.WPF.SDK` 34.0.5; see [Package Overview](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/installation/nuget/packages/llms-full.txt).
- You have decided on x64 or x86; see [x86, x64, and AnyCPU](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/x86-x64-anycpu/llms-full.txt).
- The project uses your licensed package, not a trial; see [Application Licensing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/licensing/llms-full.txt).

### Publish With Visual Studio

1. Select the WPF project in **Solution Explorer**, and choose **Build** > **Publish Selection**.
2. Select **Folder**, and click **Next**:

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

    ![The Publish tab of Visual Studio, here for a Windows Forms project, with the folder profile FolderProfile.pubxml ready to publish, the settings Target location, Configuration Release and Target runtime Portable, and the Show all settings link circled.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/publish-show-all-settings.85c3c802.webp)
6. Set **Target runtime** to `win-x64`, or to `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-wpf/vs-publish-target-runtime.2529cc17.webp)
7. Click **Publish**.

The target runtime is what makes the publish folder complete: with it, all files of TX Text Control the application needs, the native libraries and the format filters included, are copied there.

### Publish With the .NET CLI

In a terminal, in the folder of the WPF project:

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

What the options do:

- **`-c Release`** publishes the release configuration.
- **`-r win-x64`** is the target runtime: the 64-bit native libraries go next to the executable. For 32-bit, use `win-x86`. These are the only runtimes for which the package contains native libraries. Without `-r`, both sets stay in the output, in *runtimes\\win-x86\\native* and *runtimes\\win-x64\\native*.
- **`--self-contained false`** publishes framework-dependent: the application runs with the .NET Desktop Runtime of the user's machine. `--self-contained true` adds the .NET runtime to the folder instead.
- **`-o publish`** names the output folder.

### The Publish Folder

After a `win-x64` publish, the folder contains:

| Files | Role |
|---|---|
| Your executable and assemblies, such as *MyApp.exe* and *MyApp.dll* | The application, with the TX Text Control license embedded |
| *TXTextControl.WPF.dll*, *TXTextControl.dll*, *TXTextControl.Server.dll* and the other assemblies of the package | The managed part of TX Text Control |
| *tx34.dll*, *tx34\_dox.dll*, *tx34\_pdf.dll* and the other native libraries | The 64-bit document engine |
| *de* | The German resources |

The folder has no license file, because the license is inside your assembly. The complete list of files is on [Managed Assemblies and Native Libraries](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/assemblies/llms-full.txt).

Deploy the folder as a whole. Single-file publishing isn't described for TX Text Control.

### Deploy the Folder

Copy the content of the publish folder to the user's machine with your installer, a file copy or an MSIX package. That machine needs:

- **The .NET Desktop Runtime** of your target version, if the application is framework-dependent.
- **The Visual C++ runtime** in the bitness of the application; see [Visual C++ Runtime Dependencies](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/vc-runtime/llms-full.txt).

The NuGet package and the setup of TX Text Control aren't needed there. If the application fails after deployment, see [A Published .NET Application Lacks the Native Libraries](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/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-wpf/deployment/msix/llms-full.txt): package the WPF application for sideloading or the Microsoft Store.
- [CI/CD](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/ci-cd/llms-full.txt): publish in a build pipeline.
- [Deploying .NET Framework Applications](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/dotnet-framework/llms-full.txt): WPF applications for the .NET Framework.

---

## Nearby

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