Windows 10 上的 MSHTML DLL [英] MSHTML DLL on Windows 10

查看:39
本文介绍了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:

  1. 打开VS2013 开发人员命令提示符"的实例(或您碰巧使用的任何版本的 Visual Studio).右键单击图标并选择以管理员身份运行",以管理员身份运行.
  2. 导航到C:WindowsassemblyGACMicrosoft.mshtml7.0.3300.0__b03f5f7f11d50a3a".您的路径可能会有所不同.要验证,请转到C:WindowsassemblyGACMicrosoft.mshtml"并输入dir".
  3. 进入正确路径后,输入 regasm Microsoft.mshtml.dll

这篇关于Windows 10 上的 MSHTML DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆