This is a migrated thread and some comments may be shown as answers.

Could not load file or assembly 'Telerik.Web.UI, Version=2012.3.1016.40 Please help.

5 Answers 667 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
tvdang
Top achievements
Rank 1
tvdang asked on 11 Aug 2016, 03:04 PM
Hi Everyone I am new at developing and I am just simply trying to Run this website from visual studio 2010 and I am getting this error. I just copied the production source code to a test server and it runs perfectly. I am unsure why on my local machine it does not run. My version is actually 2013.1.417.40 I am unsure why it keeps referencing these 2012.3.1016.40 and 2012.2.724.0 files.

 

1)I have searched my computer and I do not have any 2012 files on it.I have added the /bin .dll file to my GAC.

 

2)I tried it add this to my webconfig but it errors out at the runtime code. I am unsure where to place it in the webconfig but I assumed anywhere inbetween <Configuration></configuration>

 
<runtime>
        <dependentAssembly>
          <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
          <bindingRedirect oldVersion="1.0.0.0-2013.1.417.40" newVersion="2013.1.417.40" />
        </dependentAssembly>
</runtime>
 

3)added this intween the <assemblies></assemblies>

<add assembly="Telerik.Web.UI, Version=2013.1.417.40, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>

4)I have removed the reference files and readded them using the dll file that is in my /bin and rebuild.

5)I have turned specific file version to false in references.

6)I have installed the Telerik asp.net ajax software(not sure if I need to do that)

 

I am running out of options. please help.

 

Parser Error Message: Could not load file or assembly 'Telerik.Web.UI, Version=2012.3.1016.40, 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)
 
Source Error:
 
 
Line 1:  <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MainMenu.ascx.cs" Inherits="Risk_Registers.MainMenu" %>
Line 2:  <%--<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>--%>
Line 3: 
 
Source File: /MainMenu.ascx    Line: 1
 
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' could not be loaded.
 
 
=== Pre-bind state information ===
LOG: DisplayName = Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4
 (Fully-specified)
LOG: Appbase = file:///C:/Users/xxx/Risk Registers/
LOG: Initial PrivatePath = C:\Users\xxx\Risk Registers\bin
Calling assembly : Risk Registers, Version=2012.2.724.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\xxx\Risk Registers\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4
LOG: Attempting download of new URL file:///C:/Users/xxx/AppData/Local/Temp/Temporary ASP.NET Files/root/80d173ca/a5cf8a4d/Telerik.Web.UI.DLL.
LOG: Attempting download of new URL file:///C:/Users/xxx/AppData/Local/Temp/Temporary ASP.NET Files/root/80d173ca/a5cf8a4d/Telerik.Web.UI/Telerik.Web.UI.DLL.
LOG: Attempting download of new URL file:///C:/Users/xxx/Risk Registers/bin/Telerik.Web.UI.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

 

 

 

 

 

5 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 12 Aug 2016, 07:18 AM

Hi,

The following section of the documentation treats known reasons for this issue and how to fix them: http://docs.telerik.com/devtools/aspnet-ajax/installation/upgrading-instructions/upgrading-a-trial-to-a-developer-license-or-to-a-newer-version#could-not-load-file-or-assembly-telerikwebui-after-upgrade.

Usually, there is an explicit reference somewhere in the project (.csproj file, or another project in the solution), or there are different assemblies on the local machine in the reference path.

Generally, you do not need to install the controls to get them working, you need to ensure the project has correct references. I usually advise you put the assemblies in the bin and I suggest you follow the manual upgrade procedure to ensure that: http://docs.telerik.com/devtools/aspnet-ajax/installation/upgrading-instructions/upgrading-a-trial-to-a-developer-license-or-to-a-newer-version#manual-upgrade.

If you will be working with references from the GAC, I strongly advise you review the following article on properly configuring them: http://docs.telerik.com/devtools/aspnet-ajax/deployment/using-the-global-assembly-cache.

Regards,

Marin Bratanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
tvdang
Top achievements
Rank 1
answered on 15 Aug 2016, 06:41 PM
Im sorry I have tried pretty much everything. I do not see anything else referencing the old version by number in my code. I have searched the whole project for the 2012 version number and there was nothing else.
0
Marin Bratanov
Telerik team
answered on 16 Aug 2016, 08:25 AM

Hi,

The only suggestions I can make at this point are:

  • perform a text search in the project files in case there is a leftover references (e.g., in the csproj/vbproj file)
  • try a binding redirect with different versions, e.g.:

    <dependentAssembly>
       <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
       <bindingRedirect oldVersion="1.0.0.0-2013.1.416.40" newVersion="2013.1.417.40" />
    </dependentAssembly>
  • remove fully qualified assembly names from the web.config (e.g., the <assembly> section and the HTTP handlers sections)
  • Clean up all temporary files an caches as explained here: http://weblogs.asp.net/psheriff/clean-up-after-visual-studio.
  • repair the .NET framework installation on your machine because if even the binding redirect and cache cleaning does not help, it is possible that there is an issue with the framework itself.

Ultimately, such an error comes from a wrong reference and our controls do not have control over the project itself so the developer would have to find and fix the problem.

Regards,

Marin Bratanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
tvdang
Top achievements
Rank 1
answered on 16 Aug 2016, 02:39 PM

I have tried your suggestions.

1)I looked in the csproj files. They all say 2013 in there.

  2)<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Telerik.Web.UI"
                              publicKeyToken="121fae78165ba3d4"
                              culture="neutral" />
            <bindingRedirect oldVersion="1.0.0.0-2012.3.1016.40" newVersion="2013.1.417.40"/>
          </dependentAssembly>
        </assemblyBinding>

3)I commented out all of the assemblies section and the HTTP handlers in the web config

4) Deleted all the caches the best I could..

5) completely reinstalled VS 2010 with SP1.

 

The thing I do not understand is why is my version 2013 ,   but it is looking for 2012.3.1016.40 ,  but it is saying Calling assembly : Risk Registers, Version=2012.2.724.0.  Does that last line mean that is the version It thinks I currently have?

0
tvdang
Top achievements
Rank 1
answered on 16 Aug 2016, 04:00 PM
Wow I apologize but I have found the solution. It is completely unrelated to the error message. a folder that it was trying to write to did not have write permissions through TFS. All I did we check it out to give it read and write permissions and it solved it self. I can not believe Ive been stumped on that error message.
Tags
General Discussions
Asked by
tvdang
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
tvdang
Top achievements
Rank 1
Share this question
or