# Installing and Updating Packages

> Add TXTextControl.TXSpell.WPF.SDK to a WPF project with the NuGet Package Manager or the .NET CLI, update it for a service pack, fix CS0246 on old targets.

- **Product:** TX Spell .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Spell .NET for WPF > Installation Guide > NuGet Packages > Installing and Updating Packages
- **1029 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/nuget/install-update/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/nuget/install-update/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/nuget/install-update/llms-full.txt

---

A project for .NET 8 or higher gets TX Spell .NET for WPF by installing a NuGet package, in the NuGet Package Manager of Visual Studio or with the .NET CLI. The package adds the assemblies, embeds your license and copies the US English language data into the output folder. When a service pack comes out, you update the package to the new version.

### Before You Start

- A project for .NET 8 or higher, created for example with the template **WPF Application**.
- A package source with the packages: **Text Control Offline Packages** on a machine with the setup, or the Text Control Private NuGet Feed; see [Configuring Package Sources](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/nuget/sources/llms-full.txt).

### Install the Package in Visual Studio

1. Select the project in **Solution Explorer** and choose **Project** > **Manage NuGet Packages...**.
2. Select **Text Control Offline Packages** in the **Package source** list, or **TextControl** for the private feed, and click **Browse**.
3. Select `TXTextControl.TXSpell.WPF.SDK`, or `TXTextControl.TXSpell.Core.SDK` for code without a user interface, and click **Install**.

    ![The NuGet Package Manager of Visual Studio with the package source Text Control Offline Packages, listing TXTextControl.TextControl.WPF.SDK and TXTextControl.TXSpell.WPF.SDK, here in the earlier versions 31.0 and 10.0, with the details of the TX Spell .NET package.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-wpf/nuget-offline-txspell.d9f82497.webp)

The WPF package adds no toolbox item: declare the spell checker as a resource in XAML, as [Create Your First WPF Application](https://docs.textcontrol.com/tx-spell-dotnet-wpf/getting-started/tx-text-control/first-application/llms-full.txt) shows.

### Install the Package With the .NET CLI

With the package source in a *nuget.config* next to the solution, add the package in the folder of the project:

```bash
dotnet add package TXTextControl.TXSpell.WPF.SDK
```

The command installs the newest version and reports it:

```text
info : PackageReference for package 'TXTextControl.TXSpell.WPF.SDK' version '11.0.1' added to file '...csproj'.
```

`dotnet add package` also takes a `--source` option with a folder or a feed. That source then replaces all others for the restore, so packages from nuget.org can no longer be found; a *nuget.config* is the safer way.

### What Changes in the Project

The project file gets a package reference:

```xml
<PackageReference Include="TXTextControl.TXSpell.WPF.SDK" Version="11.0.1" />
```

When you build, the license file *txspell.wpf.license* is embedded into your assembly, and the folders *Dictionaries*, *HyphenationLists*, *SynonymLists* and *LanguageRecognition* are copied into the output folder next to *TXSpell.dll*. [Package Overview](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/nuget/packages/llms-full.txt) lists the contents.

### Only .NET 8 or Higher

The packages target .NET 8. In a project for .NET 5, .NET 6, .NET 7 or the .NET Framework, NuGet installs them without an error, because of the language data they contain, but adds no assembly. The build then fails:

```text
error CS0246: The type or namespace name 'TXTextControl' could not be found
```

Change the target framework to .NET 8 or higher. A .NET Framework project references the assemblies of the setup instead; see [Create a .NET Framework Application](https://docs.textcontrol.com/tx-spell-dotnet-wpf/getting-started/tx-text-control/dotnet-framework/llms-full.txt).

### Update to a New Service Pack

1. Install the setup of the service pack. The same setup file updates an existing installation and adds the new package versions to **Text Control Offline Packages**. On the private feed, the new versions appear without a setup.
2. In Visual Studio, open **Manage NuGet Packages...**, select the **Updates** tab, select the package and click **Update**.

With the .NET CLI, list the packages that have a newer version, then update:

```bash
dotnet list package --outdated
dotnet add package TXTextControl.TXSpell.WPF.SDK --version 11.0.1
```

`Version="11.0.1"` in the project file means version 11.0.1 or higher. To stay on exactly one version, for example on a build server, write the version in brackets: `Version="[11.0.1]"`. [Service Packs](https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/service-packs/llms-full.txt) lists what each service pack changed.

### Related Pages

- [Package Overview](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/nuget/packages/llms-full.txt): what the packages contain.
- [Upgrading from Previous Versions](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/upgrading/previous-versions/llms-full.txt): move a project from an earlier version.
- [Installation and Package Restore](https://docs.textcontrol.com/tx-spell-dotnet-wpf/troubleshooting/installation/llms-full.txt): packages that aren't found.

---

## Nearby

- **Previous:** [Configuring Package Sources](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/nuget/sources/llms-full.txt)
- **Next:** [Visual Studio Toolbox and Designer](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/toolbox/llms-full.txt)
