1
我是Telerik OpenAccess ORM的新成員,我使用其他程序集如CRISII(內置模板)。我將這些與其他ORM的成功使用,如SubSonic,但不能與Telerik。這是我的錯誤:如何啓用Telerik Openaccess ORM加載外部程序集?
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
我正在使用XML映射 – user1655187
在您已經在線程中提供的堆棧跟蹤中,我看到Enhancer使用MetadataAttributesReader從WriterChallenge程序集中獲取OpenAccess模型。這意味着在那裏使用屬性映射。你能證實嗎? –
即使我選擇XML映射(這是默認選擇),我注意到我的類仍然使用屬性進行裝飾。這裏是一個例子: 公共部分類挑戰 { private int _iD; 公共虛擬INT ID { 得到 { 回報this._iD; } 設置 { this._iD =值; } } – user1655187