MSHTML DLL on Windows 10(Windows 10 上的 MSHTML DLL)
问题描述
我有一个使用 Smith Html Editor 的 C# 解决方案(我正在开发使用它的主项目,所以我不太了解这个库),它引用了 MSHTML.在我升级到 Windows 10 之前,这一直很好,它再也找不到 MSHTML.我可以直接引用 GAC 文件夹上的 DLL,它会停止抱怨并因此构建,但它会出现一些与编辑器未实例化相关的运行时错误.
I have a C# solution that makes use of Smith Html Editor (I'm developing on the main project which uses this, so I don't know much about this library), which makes a reference to MSHTML. This worked fine until my upgrade to Windows 10 and it can't find MSHTML anymore. I can directly reference the DLL on the GAC folder, and it stops complaining and thus builds, but it's getting some runtime errors related to the editor not instantiating.
经过一番研究,事实证明 MSHTML 已从 Windows 10 中逐步淘汰,因为它现在使用 EdgeHTML.有谁知道我该如何解决这个问题?
After a little research, it turns out that MSHTML is phased out of Windows 10 as it now uses EdgeHTML. Does anyone have any idea how I can go around this?
该解决方案仍然适用于 Windows 7.
The solution still works for Windows 7.
推荐答案
我刚刚创建了一个博客文章关于这个问题.问题是全局程序集缓存中的 Microsoft.mshtml.dll 程序集在升级过程中从 ActiveX 中注销.要解决此问题,需要在程序集上运行regasm":
I just created a blog post on this issue. The problem is that the Microsoft.mshtml.dll assembly in the Global Assembly Cache becomes unregistered from ActiveX during the upgrade process. To fix this issue, it is necessary to run "regasm" on the assembly:
- 打开VS2013 开发人员命令提示符"的实例(或您碰巧使用的任何版本的 Visual Studio).右键单击图标并选择以管理员身份运行",以管理员身份运行.
- 导航到C:WindowsassemblyGACMicrosoft.mshtml7.0.3300.0__b03f5f7f11d50a3a".您的路径可能会有所不同.要验证,请转到C:WindowsassemblyGACMicrosoft.mshtml"并输入dir".
- 进入正确路径后,输入
regasm Microsoft.mshtml.dll
这篇关于Windows 10 上的 MSHTML DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Windows 10 上的 MSHTML DLL
基础教程推荐
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
