ClickOnce部署,需要係統更新Microsoft.mshtml (ClickOnce Deployment, system update required Microsoft.mshtml)


問題描述

ClickOnce 部署,需要係統更新 Microsoft.mshtml (ClickOnce Deployment, system update required Microsoft.mshtml)

我們有一個與 MS Office 配合使用並使用 Microsoft.mshtml.dll 的應用程序。我們使用 ClickOnce 來部署應用程序。該應用程序在大多數機器上部署都沒有問題,但有時我們會收到錯誤消息“需要係統更新,Microsoft.mshtl.dll 應該在 GAC 中”。

我們嘗試安裝 PIA for Office,但沒有成功。由於 Microsoft.mshtml.dll 是一個系統相關文件,我們不能將它包含在包中並重新分發它。部署應用程序的最佳方式是什麼?


參考解法

方法 1:

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).

方法 2:

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.

方法 3:

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.

方法 4:

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.

(by mozaGulzar NazimGuy StarbuckmozaKarim Agha)

參考文件

  1. ClickOnce Deployment, system update required Microsoft.mshtml (CC BY‑SA 2.5/3.0/4.0)

#clickonce #microsoft.mshtml






相關問題

ClickOnce 發布 (ClickOnce publishing)

如何在無需重新下載每個文件的情況下更新已部署的 clickonce 應用程序? (How do I update a deployed clickonce application without having to redownload every file?)

Bạn cần thực hiện các bước nào để tạo lại tệp kê khai khi sử dụng triển khai Nhấp Một lần (What steps do you need to take to regenerate the manifest when using Click Once deployment)

將 VS 2013 中的 WPF 應用程序發佈到 Programm Files 中——不可能嗎? (Publishing a WPF app in VS 2013 in to Programm Files -- impossible?)

ClickOnce部署,需要係統更新Microsoft.mshtml (ClickOnce Deployment, system update required Microsoft.mshtml)

ClickOnce 從緩存中安裝舊程序集 (ClickOnce installing old assemblies from cache)

使用 MSBuild 發布 ClickOnce 應用 (Publish ClickOnce app with MSBuild)

單擊一個發布 (Click one Release)

使用 PostSharp 1.0 的 ClickOnce 應用程序似乎需要 GAC 中的 1.5 程序集 (ClickOnce application that uses PostSharp 1.0 seems to require 1.5 assemblies in GAC)

如何在遠程計算機上運行 ClickOnce 應用程序 (.appref-ms)? (How to run a ClickOnce application (.appref-ms) on a remote computer?)

使用證書籤署 ClickOnce? (Signing ClickOnce with a certificate?)

不安裝證書可以使用 MSBuild 的 SignFile 嗎? (Can MSBuild's SignFile be used without installing the certificate?)







留言討論