ClickOnce 部署,需要系统更新 Microsoft.mshtml

发布于 2024-07-05 18:50:37 字数 270 浏览 5 评论 0原文

我们有一个与 MS Office 一起使用并使用 Microsoft.mshtml.dll 的应用程序。 我们使用 ClickOnce 来部署应用程序。 该应用程序在大多数计算机上部署都没有问题,但有时我们会收到错误消息“需要系统更新,Microsoft.mshtl.dll 应该位于 GAC 中”。

我们尝试安装 PIA for Office,但没有成功。 由于 Microsoft.mshtml.dll 是系统相关文件,我们无法将其包含在包中并重新分发。 部署应用程序的最佳方式是什么?

We have an application that works with MS Office and uses Microsoft.mshtml.dll. We use ClickOnce to deploy the application. The application deploys without issues on most machines, but sometimes we get errors saying "System Update Required, Microsoft.mshtl.dll should be in the GAC".

We tried installing the PIA for Office without luck. Since Microsoft.mshtml.dll is a system dependent file we cannot include it in the package and re-distribute it. What would be the best way to deploy the application?

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

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

发布评论

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

评论(4

羁〃客ぐ 2024-07-12 18:50:38

您知道您的目标 MS Office 版本是什么吗? 这些 PIA 非常特定于 Office 版本。 我记得当我们构建智能客户端应用程序时,我们曾经拥有构建虚拟机,每台虚拟机都针对特定版本的 Outlook。

另一个障碍是无法将这些 PIA 指定为先决条件或将它们与应用程序捆绑在一起。 这些 PIA 需要使用 Office CD 安装在客户端上(至少对于 2003 版本)。

Do you know which version of MS Office you are targeting? These PIAs are very specific to the version of Office. I remember when we were building a smart client application, we used to have Build VM machines, each one targeting a specific version of Outlook.

Another hurdle was not being able to specify these PIAs as pre-requisites or bundle them with the app. These PIAs needs to be installed on the client using Office CD (at least for 2003 version).

回心转意 2024-07-12 18:50:38

我们的目标是 Office 2003 和 Office 2007,但使用 Office 11 (2003) dll,因为 Office 2007 向后兼容。

仅 Microsoft.mshtml.dll 文件会出现此问题。 此文件是 ClickOnce 应用程序中的先决条件。

在此特定安装中,我们尝试安装 Office 2003 和 Office 2007 PIA,但没有成功。

We are targeting Office 2003 and Office 2007, but using the Office 11 (2003) dlls as Office 2007 is backward compatible.

The problem occurs only for Microsoft.mshtml.dll file. This file is setup as a prerequisite in the ClickOnce app.

On this particular install we tried installing both the Office 2003 and Office 2007 PIA's to no avail.

乖乖 2024-07-12 18:50:38

我也有这个问题。

解决方案是转到解决方案资源管理器中的“引用”文件夹,然后右键单击“Microsoft.mshtml”,然后单击“属性”。

在“属性”页面中,将“复制本地”标记为 True。
这应该有效。

I had this problem too.

The solution to this is to go to the References folder in the solution explorer, then right click Microsoft.mshtml, then Properties.

In the Propoerties page mark "Copy Local" as True.
This should work.

仅一夜美梦 2024-07-12 18:50:38

您可以在 clickonce 应用中设置先决条件,这将检查在允许用户安装之前,先将 GAC 中的特定程序集删除。 您仍然需要在 ClickOnce 之外手动安装包含所需 Office dll 的应用程序,但至少可以避免抛出错误。

You can set up prerequisites in a clickonce app, which would check for specific assemblies in the GAC before allowing users to install. You would still need to manually install an app that includes the required office dll outside of ClickOnce, but you would at least avoid throwing errors.

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