显示可视化工具错误“无法加载此自定义查看器”

发布于 2024-08-26 20:20:35 字数 282 浏览 13 评论 0原文

当我尝试通过标准 DataSet 可视化工具检查 DataSet 时,我看到此错误“无法加载此自定义查看器”。 我编写了简单的数据集可视化工具,但还是会抛出错误。

在具有相同配置的其他计算机上,可视化工具显示没有任何错误。

操作系统:Windows 7 x86(发布)

VS:Visual Studio 2010 RC

有人有什么想法吗?

我重新安装VS没有效果。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

月下伊人醉 2024-09-02 20:20:35

尝试以下操作。

-转到工具->选项->调试->请取消选中“使用托管兼容模式”

Try the following.

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

ι不睡觉的鱼゛ 2024-09-02 20:20:35

我在 VS 2015 中遇到了同样的问题,这里的答案都没有帮助我,但我在 github 上发现了一个 问题 描述了我的问题。

对我来说,解决方案或解决方法可能更准确,是关闭我(显然)在“工具”->“工具”中打开的“使用旧版 C# 和 VB 评估器”选项。选项->调试->一般的。

I had the same issue in VS 2015 and none of the answers here helped me but I found an issue on github that described my problem.

The solution, or workaround might be more accurate, for me was to turn off the option "Use the legacy C# and VB evaluators" that I (apparently) had turned on in Tools -> Options -> Debugging -> General.

乖乖兔^ω^ 2024-09-02 20:20:35

诊断此问题的最佳方法是调试 Visual Studio 本身。尝试以下操作

  • 让 Visual Studio 进入您想要使用 Visualizer 的状态
  • 将另一个版本的 Visual Studio 附加到原始版本(仅限托管)
  • 禁用“仅我的代码”(工具 -> 选项 -> 调试器 -> 取消选中“仅我的代码”)
  • 转到调试 ->异常
  • 检查“CLR 异常”的抛出框
  • 切换回第一个 VS 并尝试显示您的可视化工具

这应该抛出一个异常,然后该异常将显示在 Visual Studio 的第二个实例中。如果此信息不足以解决您的问题,请发回此信息。

The best way to diagnose this is to debug Visual Studio itself. Try the following

  • Get Visual Studio into the state where you want to use your Visualizer
  • Attach another version of Visual Studio to the original one (managed only)
  • Disable Just My Code (Tools -> Options -> Debugger -> uncheck "Just my Code")
  • Go to Debug -> Exceptions
  • Check the Throw box for "CLR Exceptions"
  • Switch back to the first VS and Attempt to show your Visualizer

This should throw an exception which will then show up in the second instance of Visual Studio. Please post back with this information if it's not enough to solve your problem.

流绪微梦 2024-09-02 20:20:35

为我。 Visual Studio 2010 重新启动有帮助。

For me. Visual Studio 2010 restart helped.

权谋诡计 2024-09-02 20:20:35

我在 VS2017 中遇到了同样的问题,我尝试了很多,但没有任何效果,最后,我重置了我所做的所有 VS 设置,错误消失了。

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

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/

愛放△進行李 2024-09-02 20:20:35

我找到了解决方法!
我更改了DevExpress模块​​的源代码并重新编译它。之后,我将参数撤消为 NetFx40_LegacySecurityPolicyenabled="false",然后开始享受。 :)

文件是“%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;
        }
    }
}

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;
        }
    }
}
离鸿 2024-09-02 20:20:35

对我来说,我为我创建的类型编写了自己的可视化工具。显然,这会干扰 VS 2017 显示数据集内置可视化工具的能力。一旦我删除了自己的可视化工具和 Microsoft Debugger Visualizer 参考,我就可以使用内置的可视化工具了。
我在早期版本的 VS 中编写了其他可视化工具,但没有引起任何问题。

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.

不再见 2024-09-02 20:20:35

我找到了这个错误的原因。
根据此建议http://go.microsoft.com/fwlink/?LinkID=155570 我在devenv.exe.config中添加这个参数
NetFx40_LegacySecurityPolicy启用=“true”
使用 .config 文件中的此参数,尝试打开 DataSet 可视化工具时出现错误。

当我删除这个参数时,一切都变好了。异常“AppDomain 的安全状态已由配置了 NoSecurityChanges 标志的 AppDomainManager 修改”也已修复。

但我需要 NetFx40_LegacySecurityPolicyenabled="true" 参数来处理旧项目。

I found the cause of this error.
According this advice http://go.microsoft.com/fwlink/?LinkID=155570 I add to devenv.exe.config this parameter
NetFx40_LegacySecurityPolicy enabled="true"
and with this parameter in .config file I have the error when try to open DataSet visualizer.

When I remove this parameter all became ok. Execption "The security state of an AppDomain was modified by an AppDomainManager configured with the NoSecurityChanges flag" fixed too.

But I NEED NetFx40_LegacySecurityPolicy enabled="true" parameter to work with old projects.

洋洋洒洒 2024-09-02 20:20:35

清除 Visual Studio 缓存为我解决了这个问题。

只需按照以下基本步骤操作即可:

步骤 1:清除组件缓存

  1. 关闭 Visual Studio(确保任务管理器中不存在 devenv.exe)
  2. 删除目录:

%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\14.0\ ComponentModelCache

如果步骤 1 不起作用,则执行

步骤 2:清理用户的临时文件夹。删除此目录:

%USERPROFILE%\AppData\Local\Temp

如果第 2 步不起作用,则

第 3 步:删除所有这些目录:

%USERPROFILE%\AppData\Local\Microsoft\Team基础

%USERPROFILE%\AppData\Local\Microsoft\VisualStudio

%USERPROFILE%\AppData\Local\Microsoft\VSCommon

信用:https://errorhandlinginskills.wordpress.com/2018/07/28/如何清除视觉工作室缓存/

Clearing Visual Studio Cache fixed it for me.

Just follow these basic steps:

Step 1: clear the Component Cache

  1. Close Visual Studio (ensure devenv.exe is not present in the Task Manager)
  2. Delete the directory:

%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

If step 1 doesn't work then

Step 2: cleanup your user’s temp folder. Delete this directory:

%USERPROFILE%\AppData\Local\Temp

If step 2 doesn't work then

Step 3: Delete all these directories:

%USERPROFILE%\AppData\Local\Microsoft\Team Foundation

%USERPROFILE%\AppData\Local\Microsoft\VisualStudio

%USERPROFILE%\AppData\Local\Microsoft\VSCommon

Credit : https://errorhandlinginskills.wordpress.com/2018/07/28/how-to-clear-visual-studio-cache/

悲念泪 2024-09-02 20:20:35

视觉工作室->工具->选项->调试-> “使用托管兼容模式” - 取消选中此选项,也许它可以正常工作。

请点击此链接逐步查看

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

掌心的温暖 2024-09-02 20:20:35

关闭所有扩展工具并重新启动Visual Studio即可解决加载自定义查看器的问题。然后,您可以进一步对扩展工具进行一一排查,找到干扰Visual Studio的第三方扩展工具

Turn off all extension tools and restart Visual Studio to solve the problem of loading custom viewers. Then, you can further investigate the extension tools one by one and find third-party extension tools that interfere with Visual Studio

情徒 2024-09-02 20:20:35

在 Visual Studio 2019 社区中,在 16.4.x - 16.7.5 之间更新后,我所要做的就是取消选中“针对潜在不安全进程使用自定义调试器可视化工具时发出警告(仅限托管)”,它允许我看到一个视觉效果数据表的。在工具>选项>调试>常规菜单下。

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.

尸血腥色 2024-09-02 20:20:35

只需重新启动您的系统即可。你的问题将会得到解决。

Just Restart your system. Your problem will be resolved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文