部署时 Clickonce Office 加载项程序集参考问题

发布于 2024-09-13 21:41:57 字数 765 浏览 1 评论 0原文

我开发了一个 Office 2007 C# 插件。它使用clickonce进行部署。在装有 Office 2010 的系统上一切正常,但在装有 XP SP3、NET 3.5sp1 和 Office 2007 的计算机上,我收到奇怪的程序集加载错误。

我的加载项不直接引用 Microsoft.Office.Interop.SmartTag.dll。它由 Microsoft.Office.Tools.Commmon.v9.0.dll 引用 - 在我的加载项中引用。

使用 clickonce 安装加载项时,会报告错误:在我的加载项的本地安装文件夹中找不到 Microsoft.Office.Interop.SmartTag.dllMicrosoft.Office.Tools.Commmon.v9.0.dllMicrosoft.Office.Interop.SmartTag.dll 均位于 GAC 中且具有正确的版本。

我已使用 Reflector 尝试检测问题,但它通过在 GAC 中查找 DLL 轻松解决了 Microsoft.Office.Interop.SmartTag.dll 引用。

我的clickonce安装失败的可能原因有哪些?所需的组件已经存在,但显然没有咨询 GAC。

我发现将 |vstolocal 添加到 Manifest 注册表值可以使一切按预期工作,但我仍然想知道为什么我首先会收到错误。

I have developed an Office 2007 C# add-in. It uses clickonce for deployment. On systems with Office 2010 all is ok but on a machine with XP SP3, NET 3.5sp1 and Office 2007, I get a strange assembly loading error.

My add-in does not directly reference Microsoft.Office.Interop.SmartTag.dll. This gets referenced by Microsoft.Office.Tools.Commmon.v9.0.dll - which IS referenced in my add-in.

When add-in is installed with clickonce an error is reported that the Microsoft.Office.Interop.SmartTag.dll could not be found in my add-in's local install folder. Both Microsoft.Office.Tools.Commmon.v9.0.dll and Microsoft.Office.Interop.SmartTag.dll are in the GAC with correct versions.

I have used Reflector to try and detect the problem but it resolves Microsoft.Office.Interop.SmartTag.dll reference easily by finding the DLL in the GAC.

What are the possible reasons for my clickonce install to fail? The required assemblies are present but GAC is obviously not consulted.

I have found that adding |vstolocal to Manifest registry value makes everything work as expected but still I am wondering why was I getting the error in the first place.

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

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

发布评论

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

评论(1

倒带 2024-09-20 21:41:57

您是否将 PIA 和 VSTO 运行时作为部署的先决条件进行部署?

Are you deploying the PIAs as a prerequisite in the deployment, and the VSTO Runtime?

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