# Publishing .NET Applications

> Publish a Windows Forms app for .NET with TX Spell .NET in Visual Studio or with dotnet publish: target runtime, framework-dependent or self-contained.

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

---

A Windows Forms application for .NET 8 or higher that uses the NuGet package TXTextControl.TXSpell.WinForms.SDK is published like any other .NET application: **Publish** in Visual Studio, or `dotnet publish` on the command line, creates one folder that holds your application, the assemblies of TX Spell .NET and its language data. You deploy that folder, and the application checks spelling on the user's machine as it did on yours.

### Before You Begin

- The project references TXTextControl.TXSpell.WinForms.SDK; see [Package Overview](https://docs.textcontrol.com/tx-spell-dotnet-winforms/installation/nuget/packages/llms-full.txt).
- The project builds with the full version of TX Spell .NET, not the trial; see [Application Licensing](https://docs.textcontrol.com/tx-spell-dotnet-winforms/deployment/licensing/llms-full.txt).
- Every language the application checks is in the language data folders of the project; see [Installing Dictionaries and Language Data](https://docs.textcontrol.com/tx-spell-dotnet-winforms/installation/language-data/llms-full.txt).

### Publish With Visual Studio

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

    ![The Publish dialog of Visual Studio asking Where are you publishing today, with the targets Azure, ClickOnce, Docker Container Registry and Folder, and Folder selected.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/publish-target-folder.d4f0cbfc.webp)
3. Select **Folder** again as the specific target, and click **Next**.
4. Choose the folder to publish to, and click **Finish**. Visual Studio creates a publish profile.
5. On the **Publish** tab, click **Show all 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-spell-dotnet-winforms/publish-show-all-settings.85c3c802.webp)
6. When the application also uses TX Text Control, select `win-x64` as the **Target runtime**. Without TX Text Control, TX Spell .NET is platform-independent, and you can keep **Portable**:

    ![The publish profile settings with the Target runtime list open, showing Portable, the win, osx and linux runtimes, and the deployment mode Framework-dependent.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/publish-target-runtime.badc1dc3.webp)

    The screenshot shows a project for `net8.0`; a Windows Forms project targets `net8.0-windows`. The `linux-x64` runtime in the list applies to server applications, not to Windows Forms.
7. Click **Save**, then **Publish**.

### Publish on the Command Line

The same publish with the .NET CLI, for an application that uses TX Text Control:

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

Without TX Text Control, no runtime is needed:

```bash
dotnet publish -c Release
```

The files of TX Spell .NET in the publish folder are the same either way; [Assemblies and Language Data Folders](https://docs.textcontrol.com/tx-spell-dotnet-winforms/deployment/assemblies/llms-full.txt) lists them. Only TX Text Control needs the runtime: without one, its native libraries go into *runtimes\\win-x86\\native* and *runtimes\\win-x64\\native*; with `win-x64`, they sit next to the executable.

### Framework-Dependent or Self-Contained

| Deployment mode | The user's machine needs | The publish folder holds |
|---|---|---|
| Framework-dependent (the default) | The .NET Desktop Runtime of the version your project targets | Your application and the files of TX Spell .NET |
| Self-contained (`--self-contained true`, requires a runtime) | Nothing | The same, plus the complete .NET runtime |

TX Spell .NET works the same in both modes.

### Publish an ASP.NET Core Application

An ASP.NET Core application that checks text with the [TXSpell](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspell/llms-full.txt) class, or hosts the Document Editor of TX Text Control .NET Server, uses the package `TXTextControl.TXSpell.Core.SDK` instead of the Windows Forms package. It brings *TXSpell.dll*, the *de* folder with the German texts and the four language data folders, and copies them into the build and publish output in the same way, so the steps above apply unchanged.

When the application uses TX Text Control as well, select `linux-x64` for a Linux server or `win-x64` for a Windows server as the **Target runtime**:

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

Without TX Text Control, TX Spell .NET needs no runtime there either. Copy the complete publish folder to the server. [TX Text Control .NET Server Document Editor](https://docs.textcontrol.com/tx-spell-dotnet-winforms/integration/document-editor/#linux-and-docker) describes spell checking in the editor on Linux and in Docker containers.

### Single File and Trimming

Publish to a folder. Single-file publishing isn't described for TX Spell .NET, and even then the four language data folders would stay loose next to the executable. Trimming isn't available: the .NET SDK refuses `PublishTrimmed` for Windows Forms applications.

### Deploy the Folder

Copy the complete content of the publish folder to the user's machine, with your installer or any other tool. Neither the NuGet package nor the setup of TX Spell .NET is needed there, and there is no license file to add, because the license is inside your assembly. When the application misses files on the user's machine, see [A Published Application Misses Files](https://docs.textcontrol.com/tx-spell-dotnet-winforms/troubleshooting/deployment/#a-published-application-misses-files).

### Next Steps

- [Assemblies and Language Data Folders](https://docs.textcontrol.com/tx-spell-dotnet-winforms/deployment/assemblies/llms-full.txt): every file in the publish folder.
- [Build Servers](https://docs.textcontrol.com/tx-spell-dotnet-winforms/installation/licensing/build-servers/llms-full.txt): publish on a build machine with a licensed build.
- [Deploying .NET Framework Applications](https://docs.textcontrol.com/tx-spell-dotnet-winforms/deployment/dotnet-framework/llms-full.txt): deployment without the NuGet package.

---

## Nearby

- **Previous:** [Assemblies and Language Data Folders](https://docs.textcontrol.com/tx-spell-dotnet-winforms/deployment/assemblies/llms-full.txt)
- **Next:** [Deploying .NET Framework Applications](https://docs.textcontrol.com/tx-spell-dotnet-winforms/deployment/dotnet-framework/llms-full.txt)
