1

I'm new at Telerik OpenAccess ORM and I use other assemblies like CRISII (in house built for templates). I use these with other ORM's successfully like SubSonic but can't with Telerik. Here is my error:

Error    73    Unable to load assembly 'WritingChallenge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' : Could not load file or assembly 'CRISII, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b589e2deb0b5c884' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
ExceptionString:
System.SystemException: Unable to load assembly 'WritingChallenge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' : Could not load file or assembly 'CRISII, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b589e2deb0b5c884' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> 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 Telerik.OpenAccess.Metadata.MetadataAttributesReader.PrepareMetaModelTypes(Assembly assembly)
   --- End of inner exception stack trace ---
   at Telerik.OpenAccess.Metadata.MetadataAttributesReader.PrepareMetaModelTypes(Assembly assembly)
   at Telerik.OpenAccess.Metadata.MetadataAttributesReader.ReadMetaModel(Assembly assembly)
   at Telerik.OpenAccess.Metadata.AttributesMetadataSource.<>c__DisplayClass1.<FromAssembly>b__0()
   at Telerik.OpenAccess.Metadata.AttributesMetadataSource.CreateModel()
   at Telerik.OpenAccess.Metadata.MetadataSource.GetModelCore(MetadataContainer old)
   at Telerik.OpenAccess.Sdk.Enhancer.Enhancer.CrossDomainRunImpl(AssemblyLoader assemblyLoader)
   at Telerik.OpenAccess.Sdk.Enhancer.EnhancerBase.CrossDomainRun()    C:\SVNProjects\WritingChallenge\WritingChallenge\obj\Debug\WritingChallenge.dll    WritingChallenge

1 Answers1

0

A possible cause for this issue is the Attributes mapping, you are using for your domain model. You could try switching to XML mapping and using it as your mapping approach.

Damyan Bogoev
  • 688
  • 4
  • 12
  • In stack trace which you have provided in the thread, I see that the Enhancer uses the MetadataAttributesReader to get the OpenAccess Model from the WritingChallenge assembly. This means Attributes mapping is used there. Could you verify that? – Damyan Bogoev Sep 07 '12 at 18:29
  • i noticed even though I select XML mapping (which is default selection) my classes are still decorated with attributes. Here is an example: public partial class Challenge { private int _iD; public virtual int ID { get { return this._iD; } set { this._iD = value; } } – user1655187 Sep 07 '12 at 18:48
  • Changing the mapping type from the Model Settings dialog and saving the model should trigger the code generation of OpenAccess ORM. If the selected mapping type is XML, your classes will be generated without attributes applied to them and their properties. Also the XmlMetadataSource will be used the model to be read. – Damyan Bogoev Sep 07 '12 at 19:09
  • You could contact the OpenAccess ORM support team and provide a sample project which reproduces the issue, to be investigated further. – Damyan Bogoev Sep 07 '12 at 19:10