Skip to content

Commit d9c04fc

Browse files
github-actions[bot]KB Bot
and
KB Bot
authored
Added new kb article resolving-could-not-load-file-or-assembly-error-telerik-ui-ajax (#529)
Co-authored-by: KB Bot <[email protected]>
1 parent 1ce5246 commit d9c04fc

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Resolving 'Could not load file or assembly' Error in Telerik UI for ASP.NET AJAX
3+
description: This article provides solutions for resolving the 'Could not load file or assembly' error in Telerik UI for ASP.NET AJAX.
4+
type: troubleshooting
5+
page_title: Resolving 'Could not load file or assembly' Error
6+
slug: resolving-could-not-load-file-or-assembly-error-telerik-ui-ajax
7+
tags: ajax, error, assembly
8+
res_type: kb
9+
---
10+
11+
## Environment
12+
13+
| Product | Progress Telerik UI for ASP.NET AJAX |
14+
| ------- | ---------------------------------- |
15+
| Version | all |
16+
17+
## Description
18+
19+
I encountered the following error upon building a project:
20+
21+
'Could not load file or assembly 'Telerik.Web.UI, Version=20xx.x.xxx.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'
22+
23+
## Solution
24+
25+
To resolve the 'Could not load file or assembly' error in Telerik UI for ASP.NET AJAX, you can try the following solutions:
26+
27+
1. Delete the contents of the licenses.licx file and save it. Alternatively, you can delete the whole licenses.licx file.
28+
2. Make the licenses.licx file read-only.
29+
3. Right-click the Telerik.Web.UI.dll file in Windows Explorer, select Properties, and click the 'Unblock' button on the General tab.
30+
4. If your app is under source control, make sure to ignore the license file to prevent changes on a developer machine from affecting the build machine or other environments.
31+
5. Re-install the NuGet package `microsoft.bcl.build` if reference errors persist.
32+
6. Remove and re-add the reference to the Telerik.Web.UI.dll assembly. You can refer to this article for instructions: [How to update the reference to Telerik Web UI assembly in Visual Studio](https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/common-update-assembly-reference).
33+
7. Apply the troubleshooting suggestions provided in [The located assembly's manifest definition does not match the assembly reference HRESULT: 0x80131040](https://docs.telerik.com/devtools/aspnet-ajax/upgrade-compatibility/upgrading-instructions/troubleshoot-upgrade#could-not-load-file-or-assembly-telerikwebui-after-upgrade).
34+
8. Check for any other assemblies that reference the Telerik.Web.UI assembly and ensure they are updated to the same version.
35+
9. Remove any other versions of the Telerik.Web.UI assembly present in the bin directory of your application or the GAC (Global Assembly Cache).
36+
10. Ensure that the new version of the Telerik.Web.UI assembly is deployed correctly on the web server. Also, ensure that the application pool in IIS is using the correct version of the .NET Framework.
37+
11. Check for any other errors or warnings related to assembly loading or dependencies in the Windows Event Viewer or IIS logs.
38+
12. Add a bindingRedirect in the web.config file:
39+
40+
```xml
41+
<runtime>
42+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
43+
<dependentAssembly>
44+
<assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
45+
<bindingRedirect oldVersion="0.0.0.0-2020.2.512.45" newVersion="2020.2.512.45"/>
46+
</dependentAssembly>
47+
</assemblyBinding>
48+
</runtime>
49+
```
50+
51+
13. Clean and rebuild the application.
52+
14. Restart Visual Studio.
53+
15. Restart your machine.
54+
55+
## See Also
56+
57+
- [How To Fix License File Related Errors](https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/common-how-to-fix-license-file-related-errors#could-not-load-file-or-assembly)
58+
- [How to update the reference to Telerik Web UI assembly in Visual Studio](https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/common-update-assembly-reference)
59+
- [The located assembly's manifest definition does not match the assembly reference HRESULT: 0x80131040](https://docs.telerik.com/devtools/aspnet-ajax/upgrade-compatibility/upgrading-instructions/troubleshoot-upgrade#could-not-load-file-or-assembly-telerikwebui-after-upgrade)

0 commit comments

Comments
 (0)