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

Could not load file or assembly 'Telerik.OpenAcces

13 Answers 1352 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
temperory temperory
Top achievements
Rank 1
temperory temperory asked on 29 May 2011, 03:07 PM
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

13 Answers, 1 is accepted

Sort by
0
Accepted
Serge
Telerik team
answered on 30 May 2011, 10:47 AM
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.
0
Danny
Top achievements
Rank 2
answered on 15 Feb 2012, 09:44 PM
Don't forget to FTP the  C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.dll  to your website bin directory. 

0
Berrabah
Top achievements
Rank 1
answered on 27 May 2012, 01:00 PM
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 

0
Zoran
Telerik team
answered on 30 May 2012, 04:21 PM
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!
0
Aruna
Top achievements
Rank 1
answered on 15 Jan 2013, 10:54 AM
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.

0
Damyan Bogoev
Telerik team
answered on 17 Jan 2013, 12:40 PM
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.
0
Aruna
Top achievements
Rank 1
answered on 17 Jan 2013, 01:10 PM
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





0
Ivailo
Telerik team
answered on 21 Jan 2013, 10:52 AM
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.
0
Aruna
Top achievements
Rank 1
answered on 22 Jan 2013, 02:18 PM
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)
0
Ivailo
Telerik team
answered on 25 Jan 2013, 05:14 PM
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.
0
Nelson of Polomolok.com
Top achievements
Rank 1
answered on 24 Jul 2015, 07:08 PM
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. 
0
Allen
Top achievements
Rank 2
Iron
Veteran
answered on 04 Nov 2015, 06:19 PM

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.

 

0
Allen
Top achievements
Rank 2
Iron
Veteran
answered on 04 Nov 2015, 06:31 PM
Well so the problem was a stale DLL in the bin subdirectory.  Killed the bin, back to normal.  Painful.
Tags
General Discussions
Asked by
temperory temperory
Top achievements
Rank 1
Answers by
Serge
Telerik team
Danny
Top achievements
Rank 2
Berrabah
Top achievements
Rank 1
Zoran
Telerik team
Aruna
Top achievements
Rank 1
Damyan Bogoev
Telerik team
Ivailo
Telerik team
Nelson of Polomolok.com
Top achievements
Rank 1
Allen
Top achievements
Rank 2
Iron
Veteran
Share this question
or