I\'m working on a .NET 4 project, and would be able to benefit from the dynamic property access that HyperDescriptor provides, but it doesn\'t seem to be working properly when b
I downloaded the source code and ran the test with .NET 4. There's an impressive number of InvalidOperationException
thrown and caught, causing the slowness.
Go to HyperTypeDescriptionProvider.BuildDescriptor
and replace:
[ReflectionPermission(SecurityAction.Assert, Flags = ReflectionPermissionFlag.AllFlags)]
by:
[SecuritySafeCritical]
[ReflectionPermission(SecurityAction.Assert, Unrestricted = true)]
AllFlags is deprecated and only causes a warning, but asserting from a security transparent method isn't valid in .NET 4. See Security Changes in the .NET Framework 4 for more information.