部署时 Clickonce Office 加载项程序集参考问题
我开发了一个 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.dll
。 Microsoft.Office.Tools.Commmon.v9.0.dll
和 Microsoft.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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否将 PIA 和 VSTO 运行时作为部署的先决条件进行部署?
Are you deploying the PIAs as a prerequisite in the deployment, and the VSTO Runtime?