.net - 无法正确引用 MSHTML

标签 .net windows-10 visual-studio-2017 mshtml

我需要在 Windows 10(最新版本)下使用 VS2017 构建旧的 .NET 项目的小帮助。

我的问题是我需要以某种方式引用的“MSHTML”组件。通过 References - Add - COM - Microsoft HTML Object Library 这样做会导致以下构建错误:

warning MSB3283: Cannot find wrapper assembly for type library "MSHTML".
Verify that (1) the COM component is registered correctly and (2) your 
target platform is the same as the bitness of the COM component. 
For example, if the COM component is 32-bit, your target platform 
must not be 64-bit.

当我尝试直接引用 C:\Windows\system32\mshtml.tlb 时,会发生同样的错误。

我找到的唯一解决方案(例如, http://techninotes.blogspot.ru/2016/08/fixing-cannot-find-wrapper-assembly-for.html )假设 mshtml已经在 GAC 中,这不是我的情况:我在 GAC、GAC_32 和 GAC_64 文件夹中没有发现任何相似之处。

还有什么可以尝试的吗?先感谢您。

最佳答案

我有类似的情况,只有 Windows 8.1。

但问题在于另一个,插件本身可以在另一台计算机上运行,​​而不是在无法构建项目的计算机上运行。可能是操作系统的问题。

关于.net - 无法正确引用 MSHTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48084250/

相关文章:

c++ - 升级到 win 10,然后我的 Direct3D11 项目无法链接

visual-studio-2017 - 未找到导入的项目 "C:\Program Files\dotnet\sdk\2.1.201\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets"

linux - 使用 Visual Studio 2017 和 CMake 以 Linux 为目标

.net - 每个 BeginInvoke 之后必须跟一个 EndInvoke 吗?

.net - 为什么Quartz.NET创建具有相同线程ID的线程?

c# - 在选择中使用 PredicateBuilder

c# - W10 Creators 更新后,UWP MapControl 子项不再固定定位

.net - iTextSharp,一款流行的 PDF 生成工具。版本 5.5.11 符合 FIPS 标准。

linux - 如何从 WSL 中删除 Win10 的 PATH

c# - Visual Studio 2017 Collapsing 还删除了未使用的使用