visual-studiodebuggingvisualizer

Show Visualizers Error "could not load this custom viewer"


When I try to inspect DataSet by standard DataSet visualizer I see this error "could not load this custom viewer". I wrote simple dataset visualizer, but error throws anyway too.

On other computers with the same configuration visualizer show without any errors.

OS: Windows 7 x86 (Release)

VS: Visual Studio 2010 RC

has somebody any ideas?

I reinstall VS with no effect.


Solution

  • I found workaround! I changed source code of DevExpress module and recompile it. After that I undo parameter to NetFx40_LegacySecurityPolicy enabled="false", and enjoy. :)

    File is "%DeveloperExpress.NET%\Sources\DevExpress.Data\Utils\Security.cs"

    using System;
    using System.Security;
    using System.Security.Permissions;
    namespace DevExpress.Data.Helpers {
        public static class SecurityHelper {
            public static bool IsPartialTrust {
                get {
                    return !IsPermissionGranted(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess));
                }
            }
            public static bool IsPermissionGranted(IPermission permission) {
                bool result = true;
    /* (changed by Lion)
                try {
                    PermissionSet ps = SecurityManager.ResolvePolicy((System.Security.Policy.Evidence)null);
                    ps = ps.Copy();
                    ps.AddPermission(permission);
                    ps.Demand();
                }
                catch (SecurityException) {
                    result = false;
                }
    */
                return result;
            }
        }
    }