나는 엔티티가 [Property]와 [Class]와 같은 NHibernate 매핑 속성에 의해 장식되고있는 프로젝트에서 작업하고 있습니다. 불행히도 RIAServices는 이러한 특성 중 대부분을 지원하지 않는 것으로 보여서 RIAServices가 Silverlight 클라이언트 코드를 생성하려고 할 때 오류가 발생합니다.RIA Services는 NHibernate 매핑 속성으로 장식 된 엔티티를 지원하지 않습니까?
Error 2 The "CreateRiaClientFilesTask" task failed unexpectedly. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null. Parameter name: TypeName at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName) at NHibernate.Mapping.Attributes.ClassAttribute.get_NameType() --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) at System.Web.DomainServices.Tools.StandardCustomAttributeBuilder.GetPropertyValues(IEnumerable`1 propertyMaps, Attribute attribute) at System.Web.DomainServices.Tools.StandardCustomAttributeBuilder.GetAttributeDeclaration(Attribute attribute) at System.Web.DomainServices.Tools.CustomAttributeGenerator.GenerateCustomAttributes(ClientProxyGenerator proxyGenerator, CodeTypeDeclaration referencingType, IEnumerable`1 attributes, CodeCommentStatementCollection comments) at System.Web.DomainServices.Tools.CustomAttributeGenerator.GenerateCustomAttributes(ClientProxyGenerator proxyGenerator, CodeTypeDeclaration referencingType, IEnumerable`1 attributes, CodeAttributeDeclarationCollection outputCollection, CodeCommentStatementCollection comments) at System.Web.DomainServices.Tools.EntityProxyGenerator.Generate() at System.Web.DomainServices.Tools.ClientProxyGenerator.GenerateProxyClass(String& generatedCode) at System.Web.DomainServices.Tools.CreateRiaClientFilesTask.GenerateClientProxies() at System.Web.DomainServices.Tools.CreateRiaClientFilesTask.Execute() at Microsoft.Build.Framework.ITask.Execute() at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) SL
내가 유창함 자 NHibernate를 사용하는 것을 알고 : 내가에서 [클래스] 장식 법인 또는 [속성] 속성을 사용하는 DomainService을 구축 할 때
, 나는 다음과 같은 오류 메시지가있는 경우 ArgumentNullException를 얻을 수 NHibernate 의존성에 대한 필요성을 없애기 때문에 문제를 해결해야하지만, 먼저 Fluent NHibernate로 이동하기 전에 다른 솔루션이 없는지 확인하고 싶습니다. 이 문제를 푸는 데 어떤 생각이 드나요?
RIA 서비스가 아닌 NameType 속성의 NHibernate.Mapping.Attributes.ClassAttribute 클래스에서 예외가 발생하는 것처럼 보입니다. – Bryant
NHibernate Mapping Attributes가 실제로 예외를 일으킨다. [Class] 애트리뷰트를 제거하면 [Property] 애트리뷰트가 같은 예외를 발생시킨다. 이번엔 "NHibernate.Mapping.Attributes.PropertyAttribute.get_AccessType()"에서 시작한다. 클라이언트 코드 생성 (?)을 디버깅 할 수 없기 때문에 문제가있는 곳을 확인하기가 어렵습니다. RIAServices는 직렬화 가능하지만 모든 NH 매핑 속성을 지원하지 않는 것처럼 보입니다. 속성은 나머지 응용 프로그램에서 문제를 일으키지 않습니다. –