NuGet Authentication
The Text Control Private NuGet Feed at https://www.textcontrol.com/nuget/v3/index.json checks every package request against your email address and API token. If a restore fails there, one of three things is usually wrong: the credentials, the serial numbers assigned to you or the nuget.config file NuGet reads. Each of them can go wrong on a developer machine as well as on a build server.
The Feed Rejects Your Credentials
The restore of a TX Text Control package fails with the HTTP status 401 (Unauthorized) from a url that starts with https://www.textcontrol.com/nuget/.
The feed answers every package request with 401 when the credentials are missing or wrong. The service index itself is public, so NuGet reaches the feed, but can't download from it. The causes are:
- The API token has expired or was deleted. Tokens are valid for a limited time, and unassigning your last serial number that includes the feed deletes your token. See Token Validity.
- The credentials in nuget.config are wrong. The user name is the email address your serial number is assigned to, the password is the API token, which starts with
ngt_, and the element inpackageSourceCredentialsmust have the name of the source,TextControl. See File Structure.
To fix it, ask the account holder of your Text Control account to check the token in Manage API tokens and, if it has expired or is missing, to reassign a serial number to you or create a token, as Manage Tokens describes. Replace your nuget.config with the new one, and on a build server update the secret that holds the token.
A Package or Version Is Not Listed
The source TextControl works, but a package such as TXTextControl.TextControl.Core.SDK or a version such as 34.0.5 doesn't appear.
The feed shows only the packages and versions you are licensed for. A package is listed when a serial number for its product is assigned to your email address, and a new major version is listed when your license covers it.
List what the feed offers you:
dotnet package search "TXTextControl" TextControlIf the product is missing, ask the account holder to assign its serial number to you in Manage Products.
If a major version is missing, ask the Text Control sales team about your subscription.
Some packages, such as the Blazor components, are never on the private feed and come from nuget.org, as The TX Text Control Package Is Not Found describes.
You Have No nuget.config File
You have no nuget.config file for the feed, or can't find it. Text Control doesn't show the file in your account; it sends it by email when a serial number that includes the feed is assigned to you. Search your mailbox for the email that What the Developer Receives describes, or ask the account holder to reassign a serial number to you.
The Restore Ignores Your nuget.config
dotnet restore or Visual Studio doesn't use the feed, although nuget.config contains it.
NuGet reads nuget.config only from the folder of the solution and the folders above it; when you restore a project on the command line, the project folder counts as the solution folder. A <clear /> element removes the sources defined before it, and a file passed with --configfile is the only one used. Move the file, or pass it with dotnet restore --configfile path/to/nuget.config. Where to Put the File explains the rules, and why a web project must not have the file in its own folder.
The Restore Fails on a Build Server
The build works on your machine, but the restore on the build server can't find the TX Text Control packages or gets a 401.
Your personal nuget.config is not in the repository, so the build server has no credentials. The pipeline has to write the file from secrets before the restore, as CI/CD Authentication shows for GitHub Actions, GitLab, Azure DevOps, Jenkins, Bitbucket and TeamCity; in Azure DevOps, the restore task has to use the generated file. Every later step that restores has to find the file as well: dotnet publish restores again for its runtime identifier, as Publish for the Target Runtime describes. In a Docker build, pass the file as a build secret; see docker build Can't Restore the Packages.
A build server needs no license of its own; the packages are licensed to the developers. See Development Licenses.