Show Visualizers Error “could not load this custom viewer”

后端 未结 11 1985
遥遥无期
遥遥无期 2020-12-17 09:34

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

相关标签:
11条回答
  • 2020-12-17 09:43

    Try the following.

    -Go to Tools->options->Debugging->Plz Uncheck "Use Managed Compatibility Mode"

    0 讨论(0)
  • 2020-12-17 09:44

    I had the same issue in VS2017, I tried a lot but nothing was worked and finally, I reset all the VS settings which I made and the error was gone.

    https://blogs.msdn.microsoft.com/zainnab/2010/07/16/reset-all-your-development-settings/

    0 讨论(0)
  • 2020-12-17 09:48

    visual studio -> Tools-> options-> Debugging-> "Use Managed Compatibility Mode" - uncheck this and maybe it works fine then.

    plz click on this link to see step by step

    0 讨论(0)
  • 2020-12-17 09:52

    in visual studio 2019 community after an update between 16.4.x - 16.7.5 mine was broken all I had to do was uncheck "Warn when using custom debugger visualizers against potentially unsafe processes (Managed only)" and it allowed me to see a visual of the datatable. Under the tools>options>Debugging>general menu.

    0 讨论(0)
  • 2020-12-17 09:53

    For me, I had written my own visualizer for a type that I had created. Apparently, this was interfering with VS 2017's ability to display the built-in visualizer for datasets. Once I removed my own visualizer and the Microsoft Debugger Visualizer reference, I could use the built-in ones.
    I have written other visualizers in earlier versions of VS that didn't cause any problems.

    0 讨论(0)
  • 2020-12-17 09:55

    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;
            }
        }
    }
    
    0 讨论(0)
提交回复
热议问题