Could not load file or assembly 'Telerik.OpenAcces

14 posts, 1 answers
  1. temperory temperory
    temperory temperory avatar
    6 posts
    Member since:
    Apr 2010

    Posted 29 May 2011 Link to this post

    Hi Dear

     I use "Telerik.OpenAccess" and then I removed it from my project.
     Every time that I run my project for first time I got this error :

    Could not load file or assembly 'Telerik.OpenAccess, Version=2010.3.1110.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified.


    and when I refresh site it will work correctly.However there is no refrense to Telerik.OpenAccess.

    Best Regards
  2. Answer
    Serge
    Admin
    Serge avatar
    375 posts

    Posted 30 May 2011 Link to this post

    Hello temperory temperory,

     When adding a OpenAccess domain model to the project two things happen. One is that references to the OpenAccess assemblies are added and the other one is including a targets files to your csproj (vbproj) file. These targets are the ones that actually execute the enhancer over your compiled assembly and most probably the enhancer steps is the one throwing this exception. 

    In order to fix your solution you just have to open your csproj (vbproj) file and remove the following line :

    <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />

    I hope this helps.

    Best wishes,
    Serge
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
  3. DevCraft banner
  4. Danny
    Danny avatar
    7 posts
    Member since:
    Jan 2012

    Posted 15 Feb 2012 Link to this post

    Don't forget to FTP the  C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.dll  to your website bin directory. 

  5. Berrabah
    Berrabah avatar
    37 posts
    Member since:
    Feb 2012

    Posted 27 May 2012 Link to this post

    Hi  Serge,
    I have the same problem,so where should I find the line <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />
    to delete,
    I attache a VB library that contient the telerik reporting according ti m site web but I DONT USE TELERIK.OPENACCESS !!!
    Thank you 

  6. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 30 May 2012 Link to this post

    Hello Berrabah,

     I am not sure I completely understood you question? Are you using Telerik Reporting and not OpenAccess. If that is the case, then please just remove the reference in your project to the Telerik.Reporting.DatabaseSession.dll. Otherwise, I would like to have more detailed information about your project setup so we can find the actual cause for your problem. 

    Regards,
    Zoran
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
  7. Aruna
    Aruna avatar
    4 posts
    Member since:
    Jul 2012

    Posted 15 Jan 2013 Link to this post

    Hi,
    I am getting the same error that 'could not load type 'Telerick.openaccess' 
    Aslo, I checked for the entry 
    <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')
    This entry si not there in my project file.
    still its giving me problem.

  8. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 17 Jan 2013 Link to this post

    Hello Aruna,


    Could you please provide us with additional information regarding the setup you are using on your side? If case of Reporting application have you tried the resolution suggested in the previous post? Do you have any Telerik OpenAccess ORM references in your projects or deployed under the Bin folders?


    We are looking forward to hearing from you.


    Kind regards,
    Damyan Bogoev
    the Telerik team
    Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
  9. Aruna
    Aruna avatar
    4 posts
    Member since:
    Jul 2012

    Posted 17 Jan 2013 Link to this post

    Hi,
    I am using sitefinity version 5.2.38.01 version,I have included all dll from this version only,

    I have business layer which has following dlls,
    Telerik.OpenAccess.dll version - 2012.3.1012.1
    Telerik.OpenAccess.Web.dll version - 2012.3.1012.1
    Telerik.OpenAccess.Config.dll version - 1.0.0.0
    Telerik.OpenAccess.35.Extensions.dll version -  2012.3.1012.1
    Telerik.Reporting.OpenXmlRendering.dll version - 5.1.11.713
    Telerik.ReportViewer.WebForms.dll version -5.1.11.713
    Telerik.Reporting.dll version -5.1.11.713

    and my application which is referring the business layer has the following dlls,
    Telerik.OpenAccess.dll version - 2012.3.1012.1
    Telerik.OpenAccess.MySql.Data.dll version - 2010.2.1013
    Telerik.OpenAccess.Runtime.dll version - 2012.3.1012.1
    Telerik.OpenAccess.Web.dll version - 2012.3.1012.1
    Telerik.Reporting.dll version - version- 5.1.11.713





  10. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 21 Jan 2013 Link to this post

    Hello Aruna,

    Thank you for the provided details.

    In order for us to recommend the most proper solution, could you describe what are you trying to achieve - to stop using OpenAccess ORM in this project or to make it work together with Telerik Reporting and Sitefinity? Also, could you send us the entire error message that you are receiving "Cannot load type...", especially the particular assembly version that is mentioned? 

    I am looking forward to your feedback.

    Regards,
    Ivailo
    the Telerik team
    Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
  11. Aruna
    Aruna avatar
    4 posts
    Member since:
    Jul 2012

    Posted 22 Jan 2013 Link to this post

    Hi,
    The error details are as below,

    System.IO.FileLoadException: Could not load file or assembly 'Telerik.OpenAccess, Version=2012.2.628.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Generated: Tue, 22 Jan 2013 14:10:45 GMT

     
    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.FileLoadException: Could not load file or assembly 'Telerik.OpenAccess, Version=2012.2.628.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'Telerik.OpenAccess, Version=2012.2.628.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
       at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
       at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
       at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
       at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
       at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
       at System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly)
       at System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly()
       at System.Web.UI.ScriptManager..ctor()
       at Telerik.Web.UI.RadScriptManager..ctor()
       at ASP.default_aspx.__BuildControlBodyContent(Control __ctrl)
       at System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template)
       at ASP.site_master.__BuildControlBodyPlaceHolder()
       at ASP.site_master.__BuildControlform1()
       at ASP.site_master.__BuildControlTree(site_master __ctrl)
       at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)
       at System.Web.UI.Page.ApplyMasterPage()
       at System.Web.UI.Page.PerformPreInit()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
     
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
  12. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 25 Jan 2013 Link to this post

    Hi Aruna,

    It seems that the version of Sitefinity and the version of OpenAccess ORM you are using are compatible. Therefore, there are a few options for the source of this exception:
    1. Verify that the same, correct version of OpenAccess is referred in all the projects that have OpenAccess references, and in all of them you are referring as a minimum Telerik.OpenAccess.dll and Telerik.OpenAccess.35.Extensions.dll.
    2. Verify that there aren't any old references to Sitefinity 5.1, in case you have ever used it, as it requires OpenAccess 2012.2.628.2
    3. Check your web.config files for direct references to Telerik.OpenAccess assembly, as it is possible for such references to exist in many scenarios. If there are any, please update the version.

    In any case, please add the Telerik.OpenAccess.35.Extensions assembly reference to your application as well - it is required together with the Telerik.OpenAccess assembly in each project using the OpenAccess entities.

    If neither of those actions resolve your issue, it is also an option for you to send us your application so that we can analyze it provide a solution. Note that this would happen privately, not through the public forum, so please let us know and we will convert your post into a feedback ticket for that purpose. I recommend that as the fastest way to track and resolve the problem.

    I am looking forward to your feedback. 

    Greetings,
    Ivailo
    the Telerik team
    Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
  13. Nelson of Polomolok.com
    Nelson of Polomolok.com avatar
    2 posts
    Member since:
    May 2012

    Posted 24 Jul 2015 Link to this post

    Took me forever to figure this out, it's not the Telerik.OpenAccess assembly​ (the error message itself is confusing)-- simply remove Telerik.Reporting.OpenXmlRendering.dll from your BIN. 
  14. Allen
    Allen avatar
    50 posts
    Member since:
    Mar 2011

    Posted 04 Nov 2015 Link to this post

    I am getting this error for every aspx page despite the fact that I have completely uninstalled Telerik Data Access and removed all references to it from the solution.  Where is this attempt to load Telerik.OpenAccess coming from? I do not need it, do not want it, and your company has stopped developing it.  I need it to get OFF my computer.

     

  15. Allen
    Allen avatar
    50 posts
    Member since:
    Mar 2011

    Posted 04 Nov 2015 in reply to Allen Link to this post

    Well so the problem was a stale DLL in the bin subdirectory.  Killed the bin, back to normal.  Painful.
Back to Top
DevCraft banner