# .NET CLI

> Run dotnet package search, dotnet add package and dotnet restore against the private NuGet feed on Windows and Linux, in VS Code or on a build server.

- **Product:** TX Text Control .NET Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET Server > Installation Guide > NuGet Packages > Text Control Private NuGet Feed > .NET CLI
- **956 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/dotnet-cli/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/dotnet-cli/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/dotnet-cli/llms-full.txt

---

With the .NET CLI, you use the Text Control Private NuGet Feed from a terminal, for example with Visual Studio Code, on Linux or on a build server. A few commands find the packages you are licensed for, add them to a project and restore them.

### Before You Begin

- The .NET 8 SDK or higher.
- Your personalized `nuget.config` file. See [Creating an API Token](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/api-token/llms-full.txt).
- Copy `nuget.config` to your project directory. When you restore a project on the command line, NuGet treats the project directory as the solution directory and reads the file from there. See [nuget.config](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/nuget-config/llms-full.txt).

### Search for Packages

List the packages that your license gives you access to:

```bash
dotnet package search "TXTextControl" --source TextControl
```

`--source TextControl` limits the search to the package source with the key `TextControl` in `nuget.config`. The results show the package ID, the latest version, the owner and the number of downloads for each package.

The search results show only the packages you are authorized to use. This is by design, so there is no confusion about what you may use. For example, a developer who is licensed for TX Text Control .NET Server and TX Text Control .NET for WPF sees `TXTextControl.TextControl.ASP.SDK`, `TXTextControl.TextControl.Core.SDK`, `TXTextControl.TextControl.WPF.SDK` and the web packages, but not `TXTextControl.TextControl.WinForms.SDK`.

### Add a Package

Add a package to the project in the current directory:

```bash
dotnet add package TXTextControl.TextControl.Core.SDK
```

NuGet retrieves the package from the private feed with the credentials in `nuget.config`. On the server, the license is injected into the package before the download, so the package is ready to use immediately.

To install a specific version, add the `--version` option. The command adds a package reference with this version to the project file:

```bash
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.5
```

[Package Versioning](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/versioning/llms-full.txt) explains the version numbers and which versions belong together.

### Add the Packages for a Scenario

Most applications need more than one package. For an ASP.NET Core application with the Document Editor, run the following commands in the project folder:

```bash
dotnet add package TXTextControl.Web
dotnet add package TXTextControl.TextControl.Core.SDK
dotnet add package TXTextControl.Web.DocumentEditor.Backend
```

Packages that are published on nuget.org, such as `TXTextControl.Web.Blazor.DocumentEditor`, are installed with the same command, as long as nuget.org is one of your package sources, as in the file structure shown in [nuget.config](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/nuget-config/llms-full.txt). [Package Overview](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/packages/llms-full.txt) lists the packages for each scenario.

### Restore and Build

`dotnet build` and `dotnet run` restore missing packages automatically. On a build server, restore the packages in a separate step and then build without restoring again:

```bash
dotnet restore
dotnet build --no-restore --configuration Release
```

If the configuration file is not in the project or solution folder, pass it explicitly. NuGet then uses only the settings from this file:

```bash
dotnet restore --configfile path/to/nuget.config
```

The commands work the same way on Windows and Linux. Most of Text Control's CI/CD examples run them on Linux build agents. See [CI/CD Authentication](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/ci-cd/llms-full.txt).

### Next Steps

- [Create Your First Application](https://docs.textcontrol.com/tx-text-control-dotnet-server/getting-started/document-processing/first-application/llms-full.txt) — create a console application with the .NET CLI.
- [CI/CD Authentication](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/ci-cd/llms-full.txt) — restore packages in a build pipeline.
- [Package Versioning](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/versioning/llms-full.txt) — pin versions and keep packages together.
- [NuGet Authentication](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/nuget-authentication/llms-full.txt) — solve problems with the feed.

---

## Nearby

- **Previous:** [Visual Studio](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/visual-studio/llms-full.txt)
- **Next:** [CI/CD Authentication](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/private-feed/ci-cd/llms-full.txt)
