Updating NuGet Packages
A new service pack, web package version or major version of TX Text Control means updating the NuGet packages of your .NET project. The steps cover Visual Studio and the .NET CLI, the Text Control Private NuGet Feed and the Text Control Offline Packages, and what to rebuild, redeploy and check afterward.
Before You Begin
- Know your package source. Licensed developers install the packages from the Text Control Private NuGet Feed (source name
TextControl). Projects created with the setup use the local source Text Control Offline Packages. A few packages, such asTXTextControl.Web.Blazor.DocumentEditor, come from nuget.org. - Check your API token. An API token for the private feed is valid for a limited time. If the feed rejects your credentials, see NuGet Authentication.
- Read the breaking changes. For an update to a new major version, read Breaking Changes first. Some changes arrived with a service pack or a web package version, for example the new PDF.js settings of the Document Viewer 32.2.1, so check the entries of your current major version as well.
Update the Packages Together
Update the SDK package and all TX Text Control web packages in a project at the same time, and keep them on the same major version. Text Control releases them as a set: the Service Pack 5 package set, for example, contains the SDK packages 34.0.5, TXTextControl.Web 34.5.0 and TXTextControl.Web.DocumentViewer 34.2.0.
The SDK packages and the web packages have different numbers after the major version, because the third number of the SDK packages is the service pack, while the web packages have their own minor versions. Keep the major version the same and install the newest version of each package that is available to you. Package Versioning lists the current version of each package and explains the numbers.
Check for New Versions
The private feed only shows the packages and versions that your license gives you access to. If you don't see a version you expect, check with your account owner which serial numbers are assigned to you.
To list the TX Text Control packages that are available to you on the private feed, run:
dotnet package search "TXTextControl" TextControl
To list the packages of your project that have newer versions, run the following command in the project folder:
dotnet list package
With the .NET 10 SDK, you can also use the new form dotnet package list --outdated. By default, --outdated lists the latest stable versions.
Update in Visual Studio
- In Solution Explorer, select your project and choose Manage NuGet Packages... from the Project menu.
- In the Package source drop-down, select the source you installed the packages from, for example TextControl.
- Open the Updates tab. It lists the installed packages that have newer versions.
- Select a TX Text Control package and choose the latest stable version from the Version drop-down. Update it.
- Repeat the previous step for every TX Text Control package in the project, so that all of them have the same major version.
If Visual Studio does not show the TextControl source, follow the steps in Visual Studio.
Update With the .NET CLI
dotnet add package adds a package reference, or updates it if the project already references the package. Pass the version you want with --version. For a project that uses the Document Editor with the Core engine, the commands for the Service Pack 5 package set are:
dotnet add package TXTextControl.TextControl.Core.SDK 34.0.5
dotnet add package TXTextControl.Web 34.5.0
dotnet add package TXTextControl.Web.DocumentEditor.Backend 34.5.0
Without --version, the command updates the reference to the latest compatible version. With the .NET 10 SDK, dotnet package add is an alias of dotnet add package.
For build servers and Docker builds, the nuget.config file with your feed credentials must be available during the restore. See CI/CD Authentication.
Update From Text Control Offline Packages
The Text Control Offline Packages source is filled by the setup. To get newer packages in this source, install the new setup first:
- Download the setup. The account owner downloads it from the Text Control account. Assigned developers receive an email with a download link; if you did not receive it, contact the account owner.
- Run the setup. The same setup is used for full versions and service packs, and it detects whether it has to patch an installed version or install a new one.
- Update the packages from the Text Control Offline Packages source as described in "Update in Visual Studio" above.
To switch to the private feed instead, see Migrating from Previous Versions.
Rebuild and Redeploy
- Rebuild the solution, for example with Build > Rebuild Solution in Visual Studio or with
dotnet build. - Test the application with the new version.
- Publish and deploy the application as before. See the Deployment Guide.
Make sure that the Document Editor backend is updated as well. Which step this requires depends on how the backend runs:
- Hosted by the
TXTextControl.Web.DocumentEditor.Backendpackage. The package adds the backend worker files (TXTextControl.Web.Server.Core.dlland related files) to the build output and to the output ofdotnet publish. Updating the package and redeploying the application updates the backend. - Deployed separately, for example as a standalone process, a Windows service, a Linux daemon or a container. Replace the backend files on that machine or rebuild that container with the files of the new version.
- The TX TextControl Service, which ASP.NET Core applications used up to version 32.0 and ASP.NET applications on the .NET Framework still use. For a service pack, stop the Windows service, replace its files with the files from the installation folder of the patched version and start the service again. The patched version listens on the same TCP port. The service of a new major version listens on a different TCP port, so it can be installed next to the old one. Migrating to the backend package is described in Migrating from Previous Versions.
For version 32.0, Text Control shows these PowerShell commands to stop and start the service:
Stop-Service -Name "TX TextControl 32.0 Service" -Force
After you have replaced the files, start the service again:
Start-Service -Name "TX TextControl 32.0 Service"
Verify the Update
- Package versions. Run
dotnet list packagein the project folder. The Resolved column shows the version each package reference uses. - Service pack. The file versions of the TX Text Control assemblies change with a service pack, but they don't carry its number. To see the service pack an application runs with, read VersionInfo.ServicePack, as Check the Service Pack of an Assembly describes.
- Application. Start the application and open the pages that use the Document Editor and the Document Viewer. The
DocumentEditorWorkerManagerof the backend package forwards the output of the backend worker process to the ASP.NET Core logging, so check the log if the editor does not connect.
If something fails after the update, see Troubleshooting.
Next Steps
- Updating npm Packages: update the Angular and React frontends to the same major version.
- Breaking Changes: the changes each major version requires.
- Package Overview: which package you need for which component.
- Deployment Guide: deploy the updated application.