Could not load file or assembly Telerik.Web.UI

1 Answer 22 Views
Ajax General Discussions
Nancy
Top achievements
Rank 1
Iron
Iron
Nancy asked on 12 Jun 2025, 11:18 PM

Hi, I recently received a new laptop at work.  I was eventually able to compile and run both of my 2 applications in localhost, and deploy one of them to Dev and Prod.  However, I am having problems deploying my 2nd application. 

Again, it works fine in localhost.  When I deploy to the Dev environment, I get the error:

Could not load file or assembly 'Telerik.Web.UI, Version=2018.1.117.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

The version my reference points to is 2018.2.516.45.  So I don't know where the 2018.1.117.45 version is coming from, or why it is attempting to load this version.

Yes, I KNOW that this is an old version. If need be, I can probably upgrade to a newer version.  But if I can't figure out the version mis-match now, I think I will have the same problem with a newer version.  

Any help is appreciated.  

Thanks!

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 13 Jun 2025, 02:02 PM

Hello Nancy,

Based on the description sounds like the development environment still contains some files referencing the previous version.

When deploying the application I would assume the web.config, assemblies, and code files are copied over carrying the latest version you configured, so there must be something else left on the dev environment. Could you please check for a file called licenses.licx on the dev machine? If you find it, you can open it with an editor and read the contexts. It's clear text with entries referencing the Telerik versions. You can either remove the file or delete the contents, this should fix the error.

If it's not the licenses.licx file, then I would double check the web.config after deployment and verify the references in there. 

Also worth noting that the additional libraries such as the Telerik Document Processing Libraries (DPL) that are name as Telerik.Windows.Documents.{xyz}.dll are tied to the major versions of the Telerik controls.

The first two segment in the versions represent the major version, the third segment is the date and the last segment is the Target framework. If the Telerik UI for ASP.NET AJAX is version 2018.2.xxx.yy then the DPL versions should also be the same. They cannot be on version 2018.1.xxx.yy.

I would also do a Global search in the project files located in the Dev environment for the version 2018.1.117 to see if there is any usage. 

Please give my suggestions from above a try and let us know how it goes.

Regards,
Attila Antal
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Nancy
Top achievements
Rank 1
Iron
Iron
commented on 13 Jun 2025, 06:03 PM

Hi Attila,

I tried deployments both with deleting the .licx file, and deleting plus excluding it.  Both still got the same error. 

Following is the Telerik stuff I have in the Web.Config. I don't see anything resembling 2018.

What do you mean by "DPL"?

Where else in the solution could there be 2018.1.117.45?


<httpHandlers>
  <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/>
  <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>
  <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
  <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>
  <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
</httpHandlers>

<handlers>
  <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>
  <add name="Telerik.Web.UI.DialogHandler.axd_*" path="Telerik.Web.UI.DialogHandler.axd" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode"/>
</handlers>

Nancy
Top achievements
Rank 1
Iron
Iron
commented on 16 Jun 2025, 05:32 PM

Hi Attila, any more ideas?  I am basically stuck until this is fixed.  Thanks.
Attila Antal
Telerik team
commented on 18 Jun 2025, 10:05 AM

Hi Nancy,

Just to clarify. The investigation should be performed on the environment where you're planning to deploy the Telerik. Since everything work on your Laptop but the problem happens when deploying, that can only mean, that the Deployment (remote) environment is holding references to older versions. While you have removed the licenses.licx file from your Laptop and excluded it from the project, the remote machine may still have it. 

Please connect to the remote machine, and search through the web.config and for the license file. There's a good chance not everything is deployed from the laptop, hence having outdated files on the remote. 

DPL stands for Document Processing Libraries additional .NET Libraries provided by our company for creating and working with documents, see Telerik Document Processing Libraries.

The assembly names start with "Telerik.Windows.Documents.{name}.dll" and they are tied to the Telerik's major version, see Included Assemblies documentation page for a full list.

 

Nancy
Top achievements
Rank 1
Iron
Iron
commented on 18 Jun 2025, 08:40 PM

Hi Attila,

In the Dev/Remote environment, the .licx is excluded (via .Net), deployed that way, and the actual file does not exist anywhere in the file structure of the solution.  Nor does the text "2018".

Nancy
Top achievements
Rank 1
Iron
Iron
commented on 18 Jun 2025, 08:43 PM

What is the proper way to check the version of a .dll?  I do a right-click on the file, properties, details, then check "Product version".

Nancy
Top achievements
Rank 1
Iron
Iron
commented on 18 Jun 2025, 10:42 PM

Could the "Target framework" be causing the problem?
It is set, and deployed to Dev/Remote as, .NET Framework 4.8.
According to my Github, the previous version was 4.5.2.  
It apparently changed with my new laptop and Visual Studio 2022 (I had an older version previously).  
Visual Studio does not show an option to change back to 4.5.2.  The 2 most recent versions possible are 3.5 and 4.7.2.

Attila Antal
Telerik team
commented on 20 Jun 2025, 07:20 AM

Hi Nancy,

Property window -> Details tab is the correct way to check for the assembly version. The Target framework will not be the cause as the assembly will work with anything between .NET Framework 4.5 and higher.

I still believe there is something on the development server that is referencing the older Telerik version. It could be another assembly, for instance, the Document Processing Libraries (DPL). See Document Processing Libraries. Please check all their versions and confirm that the version number starts with 2018.2 for all of them.

Alternatively, you can use a binding redirect to instruct the project to use the new version for every case (old and new).

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2018.2.516" newVersion="2018.2.516" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

Note: I have created a support ticket where I asked you to share the project files with me so I can take a look at them. Let us continue the discussion in that ticket and we will post the solution here once found.

Tags
Ajax General Discussions
Asked by
Nancy
Top achievements
Rank 1
Iron
Iron
Answers by
Attila Antal
Telerik team
Share this question
or