The following line of code when debugging finds the correct custom validator and steps into it's constructor and immediately throws a "Target of Invocation Exception". The inner exception states "operation may destabilize the runtime".<br /><br /> public class EntityBase<TSource><br /> {<br /> public IList<ValidationError> ValidationErrors { get; protected set; }<br /><br /> public AbstractValidator<TSource> Validator { get; protected set; }<br /><br /> public bool Validate(TSource entity)<br /> {<br /> var entityValidator = Activator.CreateInstance(entity.GetType().BaseType.Assembly.GetName().Name, string.Format(entity.GetType().BaseType.Assembly.GetName().Name + ".{0}.Validators.{0}Validator", entity.GetType().BaseType.Name)).Unwrap();<br /> }<br /><br />The class that is being invoked is not in the same assembly and the assembly is not referenced in the project where this call above happens because it would cause a circular reference.<br /><br />Any help would be greatly appreciated.
Comments: I'm not able to reproduce this. Please attach a sample project to this issue that reproduces the problem then I'll be able to investigate further.
Comments: I'm not able to reproduce this. Please attach a sample project to this issue that reproduces the problem then I'll be able to investigate further.