Declined
Last Updated: 13 Jun 2025 14:37 by ADMIN
Martin Ivanov
Created on: 04 Apr 2025 06:24
Category: UI for WPF
Type: Bug Report
0
Licensing: Cannot resolve dependency to assembly Telerik.Licensing.Runtime error in a project that doesn't use any Telerik code, but references a class library that references Telerik nugets

A compilation error occurs in a project that doesn't use any Telerik code, but it references a class library which installs the Telerik.Licensing NuGet package. 

The error message from the class library project is the following:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(268,9): error MC1000: Unknown build error, 'Cannot resolve dependency to assembly 'Telerik.Licensing.Runtime, Version=1.4.6.0, Culture=neutral, PublicKeyToken=keyhere' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.'

To workaround this, you can add assembly references to the Telerik dlls in the main project (including Telerik.Licensing.Runtime), instead of using NuGet packages.

Alternatively, you can install the Telerik.Licensing NuGet package also in the class library.

<ItemGroup>
	<PackageReference Include="Telerik.Licensing" Version="1.4.*" />
</ItemGroup>

Note that with this approach you will see a message in the output that no license is installed, even if you have one. However, for now (versions from 1.4.6 to 1.4.12, which is the latest at the moment of writting this post), the error won't apply any compile or runtime restrictions on the UI or the functionality.

 

1 comment
ADMIN
Martin Ivanov
Posted on: 13 Jun 2025 14:36

Closing this issue because the original problem comes from a limitation in the Telerik.Licensing package which cannot be resolved. To avoid the error the Telerik.Licensing package should be installed in all projects that reference the class library with the Telerik code.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.