Telerik License Error CS0234 in Telerik UI for ASP.NET AJAX
Environment
| Product | UI for ASP.NET AJAX |
| Version | 2025 Q1 and newer |
Description
I receive the error CS0234: The type or namespace name 'EvidenceAttributeAttribute' does not exist in the namespace 'Telerik.Licensing' (are you missing an assembly reference?) when working with the TelerikLicense.cs file in a project using Telerik UI for ASP.NET AJAX. This error occurs after installing the controls through the Telerik Control Panel.
Cause
Starting with version 2025 Q1, Telerik UI for ASP.NET AJAX requires activation using a License/Script Key. Additionally, the Telerik.Web.UI.dll assembly now depends on the Telerik.Licensing.Runtime.dll assembly, which is essential for proper licensing.
Solution
To resolve this issue, ensure the Telerik.Licensing.Runtime.dll assembly is properly included in your project. Follow these steps:
-
Verify that the
Telerik.Licensing.Runtime.dllassembly is present in the project'sBINfolder. -
If the assembly is missing, add it to your project by performing one of the following:
- Obtain the
Telerik.Licensing.Runtime.dllassembly from the official Telerik Licensing NuGet package. - Download a manual installation from https://www.telerik.com/account/downloads/product-download?product=RCAJAX. locate the
Telerik.Licensing.Runtime.dllfile in the Bin462 folder and manually reference it in your project.
- Obtain the
-
For web application projects, it is recommended to add the assembly via NuGet. Run the following command in the NuGet Package Manager Console:
Install-Package Telerik.Licensing -
Rebuild the project and ensure no errors appear.
-
If the issue persists, verify that the
.csprojfile includes a reference toTelerik.Licensing.Runtime.dll. Example:xml<Reference Include="Telerik.Licensing.Runtime"> <HintPath>path-to-bin-folder\Telerik.Licensing.Runtime.dll</HintPath> </Reference> -
Confirm that the correct version of the
Telerik.Web.UI.dllandTelerik.Licensing.Runtime.dllassemblies are being used.