|
| 1 | +--- |
| 2 | +title: Resolving License Validation Issues in Telerik Document Processing Libraries |
| 3 | +description: Troubleshooting the issue where the license is not recognized during runtime in Telerik Document Processing Libraries. |
| 4 | +type: troubleshooting |
| 5 | +page_title: License Not Recognized in Telerik Document Processing Libraries |
| 6 | +meta_title: License Not Recognized in Telerik Document Processing Libraries |
| 7 | +slug: license-not-recognized-telerik-document-processing-libraries |
| 8 | +tags: telerik, document, processing, license, validation, runtime, issues, licensing, diagnostics |
| 9 | +res_type: kb |
| 10 | +ticketid: 1690929 |
| 11 | +--- |
| 12 | + |
| 13 | +## Environment |
| 14 | + |
| 15 | +| Version | Product | Author | |
| 16 | +| ---- | ---- | ---- | |
| 17 | +| 2025.2.520| RadPdfProcessing |[Desislava Yordanova](https://www.telerik.com/blogs/author/desislava-yordanova)| |
| 18 | + |
| 19 | +## Description |
| 20 | + |
| 21 | +This article aims to address potential licensing issues while generating Excel (or PDF, DOCX, etc.) files with Telerik Document Processing Libraries during **runtime** testing. The generated file contains a "License" sheet (or a watermark) with a trial message, despite the **Build Output** window indicating a valid license. The issue arises in a multi-project (e.g. Blazor WASM) application setup, where dependencies are shared across projects. |
| 22 | + |
| 23 | +## Cause |
| 24 | + |
| 25 | +This issue generally occurs due to incomplete license validation during runtime in complex setups, particularly when using shared libraries or plugin architectures. *Even if the license is validated during build time, runtime environments may fail to recognize it due to transitive dependency limitations.* |
| 26 | + |
| 27 | +## Solution |
| 28 | + |
| 29 | +The **Telerik.Licensing** verifies the DevSeat association at the time your classlib is built, and also provisions at runtime licenses in the Root app. When you have a setup such as **"Root app -> classlib -> Telerik UI"**, the Telerik UI will execute and verify the licensing for the classlib, but will not be applied transitively in the Root app. That's why you **need to add the Telerik.Licensing NuGet package reference to Root app manually**. |
| 30 | + |
| 31 | +To ensure proper license validation and eliminate trial messages, follow the steps below: |
| 32 | + |
| 33 | +* **Direct Package References**: Add references to the **Telerik.Licensing** package directly in the Root project. This resolves transitive dependency limitations. |
| 34 | + |
| 35 | +* **Explicit License Registration**: Add a call to `TelerikLicensing.Register()` early in your application lifecycle. For Blazor WASM applications, include this call in the `Program.cs` file. This approach validates the license explicitly. |
| 36 | + |
| 37 | +* **Verify Assemblies**: Ensure **no trial** versions of Telerik assemblies are referenced in any project. Replace [trial assemblies]({%slug upgrade-trial-to-licensed-version%}) with licensed ones, if such even exist. |
| 38 | + |
| 39 | +* **Enable Diagnostics**: Add the following property to your `.csproj` file to enable detailed licensing diagnostics during build and runtime: |
| 40 | + ```xml |
| 41 | + <PropertyGroup> |
| 42 | + <TelerikLicensingVerbosity>diagnostic</TelerikLicensingVerbosity> |
| 43 | + </PropertyGroup> |
| 44 | + ``` |
| 45 | + Review the diagnostic output for clues about license validation issues. |
| 46 | + |
| 47 | +* **Avoid Environment Variables**: Use only the `telerik-license.txt` file for license delivery instead of environment variables, which can cause issues due to length limitations. |
| 48 | + |
| 49 | +By following these steps, runtime validation issues should resolve, and the trial message will no longer appear in generated documents. |
| 50 | + |
| 51 | +## See Also |
| 52 | + |
| 53 | +- [Telerik Document Processing Licensing Overview]({%slug introduction%}) |
| 54 | +- [Setting Up Your Telerik Document Processing Libraries License Key]({%slug setting-up-license-key%}) |
| 55 | +- [Using TelerikLicensing.Register Method]({%slug adding-license-key-ci-cd-services%}#using-teleriklicensingregister-method-on-aws-lambdas) |
| 56 | +- [Diagnostic Options for Telerik Licensing]({%slug telerik-trial-version-message-diagnostic-options%}) |
0 commit comments