This is the complete stacktrace:

  The invoked member is not supported in a dynamic assembly.
  mscorlib

   at System.Reflection.Emit.AssemblyBuilder.GetManifestResourceStream
(String name)
   at NHibernate.Validator.Cfg.XmlMappingLoader.AddResource(Assembly
assembly, String resource)
   at NHibernate.Validator.Cfg.XmlMappingLoader.GetXmlMappingFor(Type
type)
   at
NHibernate.Validator.Engine.JITClassMappingFactory.GetExternalDefinitionFor
(Type type)
   at
NHibernate.Validator.Engine.JITClassMappingFactory.GetClassMapping
(Type clazz, ValidatorMode mode)
   at NHibernate.Validator.Engine.ClassValidator.InitValidator(Type
clazz, IDictionary`2 childClassValidators)
   at NHibernate.Validator.Engine.ClassValidator..ctor(Type clazz,
IConstraintValidatorFactory constraintValidatorFactory, IDictionary`2
childClassValidators, IClassValidatorFactory factory)
   at
NHibernate.Validator.Engine.StateFullClassValidatorFactory.GetRootValidator
(Type type)
   at NHibernate.Validator.Engine.ClassValidator.GetClassValidator
(Type entityType)
   at
NHibernate.Validator.Engine.ClassValidator.MakeCollectionValidation
(IEnumerable value, Object entity, MemberInfo member, ISet
circularityState, ICollection`1 results)
   at NHibernate.Validator.Engine.ClassValidator.MakeChildValidation
(Object value, Object entity, MemberInfo member, ISet
circularityState, ICollection`1 results)
   at NHibernate.Validator.Engine.ClassValidator.GetInvalidValues
(Object entity, ISet circularityState)
   at NHibernate.Validator.Engine.ClassValidator.GetInvalidValues
(Object entity)
   at lgTronic.Infrastructure.Test.ModelValidationFixture.GetError[T]
(String prop, T item) in C:\NoBackup\Projects\Programming\GitRepository
\Infrastructure\lgTronic.Infrastructure.Test
\ModelValidationFixture.cs:line 96
   at
lgTronic.Infrastructure.Test.ModelValidationFixture.PersonValidation()
in C:\NoBackup\Projects\Programming\GitRepository\Infrastructure
\lgTronic.Infrastructure.Test\ModelValidationFixture.cs:line 172


Is there anyone who can help me ???

//lasse


On 3 Dec, 17:31, LasseL <[email protected]> wrote:
> Hi
>
> I got the following exception when writing testcases for NHibernate in
> VS2008
>
> Test method
> lgTronic.Infrastructure.Test.ModelValidationFixture.PersonValidation
> threw exception:  System.NotSupportedException: The invoked member is
> not supported in a dynamic assembly..
>
> The exception occurs when I add the following line to a IList of
> items:
> .HasValidElements();
>
> The constraints definition looks like:
>             Define(x => x.Emails)
>                 .NotNullable().WithMessage("Emails List must be
> initialized")
>                 .And
>                 .HasValidElements();
>
> Anone who have seen this,, and can tell me how to avoid it.
>
> //lasse

--

You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to