Developer forum

Forum » CMS - Standard features » Very frustrating...

Very frustrating...

Kevin O'Driscoll
Reply

Does any one know why this is happening? v8.9.2.6

An error occured while attaching module (Dynamicweb.Frontend.Content)
Dynamicweb.Extensibility.ActivationException: IQueryService - LoaderExceptions information: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.RuntimeModule.GetTypes() at System.Reflection.Assembly.GetTypes() at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog() at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition) at System.ComponentModel.Composition.Hosting.DirectoryCatalog.<>c__DisplayClass34_0.b__0(ComposablePartCatalog catalog) at System.Linq.Enumerable.d__17`2.MoveNext() at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InnerCatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports) at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports) at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports) at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore(Type type, Type metadataViewType, String contractName, ImportCardinality cardinality) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore[T](String contractName) at Dynamicweb.Extensibility.MefServiceLocator.DoGetInstance(Type serviceType, String key) at Dynamicweb.Extensibility.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) --- End of inner exception stack trace --- at Dynamicweb.Extensibility.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) at Dynamicweb.Extensibility.ServiceLocatorImplBase.GetInstance[TService]() at Dynamicweb.Modules.QueryPublisher.Frontend.GetContent() at Dynamicweb.Frontend.Content.GetModule(DataRow& ParagraphRow)

Does Dynamicweb.Extensibility really need EF 6?


Replies

 
Nicolai Pedersen
Reply

Hi Kevin

No, I do not think we need that.

What module is attached on this paragraph? I can see it tries to load a IQueryService object - I think that is the implementation of that that have the reference to EF.

I would recommend that you upgrade to the latest 8 before debugging any further.

Thanks, Nicolai

 
Kevin O'Driscoll
Reply

Thanks Nicolai

This is a recent upgrade and only happens on one server, staging is ok. I checked machine.config and all web.configs and all ok (no refs to EF6 and dont have this as a package, [EF6 is usually installed as a package]). Error happens whenever a query publisher is on a page (I have 2 errors on a page with 2 query publishers switching these off the error goes away). In Admin I get this when I go to Users and Management Centre: [Attached screenshot]

I dont really want to release anything else to staging until this is resolved. If it means upgrade to 8.9.2.21, but we have the Live site that needs an upgrade to 9 so we need 8 to touch the database before 9.

 

 

 

EntityFramework_Error.JPG
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
This post has been marked as an answer

It sounds like you have some assembly that depends on EF. It could be that the extensibility framework is looping over all assemblies and tries to load their dependencies. Make sure your Bin folder doesn't have any custom DLLs that depend on EF. Simplest thing to do would be to copy over all assemblies to your site's bin folder and then look at the ones that didn't get selected / overwritten.

Imar

Votes for this answer: 1
 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hmm... try an update - see if it persists. I have no references for EF in DW8 branch and no bugs that we removed it...

Make sure your bin folder does not hold an unwanted dll - try to delete ALL files from it and copy the content of the /bin from the downloaded zip file

Votes for this answer: 1
 
Kevin O'Driscoll
Reply

Great idea guys.. Ill try that

 
Kevin O'Driscoll
Reply

"extensibility framework is looping over all assemblies and tries to load their dependencies" (I did not know about this)

So I cleaned all .dlls and found a Third Party .dll LinqKit.dll had EF6 dependancy. I use this in a test branch for creating query predicates on the fly. I use this in conjunction with the standard new index and index queries (4 parameters) to refine in detail the results. This the predicate builder builds the UI dynamically and fires the results.

I found they also have a version that does not depend on EF LinqKit.Core.dll and have installed that as a package and the errors went away.

http://www.albahari.com/nutshell/predicatebuilder.aspx

https://github.com/scottksmith95/LINQKit#original-source-and-author

 
Nicolai Pedersen
Reply

Thanks for the update - and glad you figured it out!

 

You must be logged in to post in the forum