gpt4 book ai didi

visual-studio-2010 - Windows 7 下的 ClickOnce/Excel-VSTO

转载 作者:行者123 更新时间:2023-12-04 20:18:22 25 4
gpt4 key购买 nike

我们在 VS2010 中开发了一个 .Net 4.0 VSTO Excel 插件,我们正在通过 ClickOnce 进行部署。我们的可部署在 Windows XP 上似乎很好,但在 Windows 7 上安装时问题很大。这些问题似乎都与何时需要通过 Excel 删除插件有关(即它已被 Excel 软删除[例如,由于失败等) ],然后用户通过 Excel | Options | AddIns | Manage | COM AddIns 对话框将其“删除”。

上述情况会导致在发生上述情况后重新安装插件,它不会在 Excel 中公开 - 即 Excel 插件选项卡(如果安装了一个或多个插件,通常会出现)永远消失。当我们正在开发/调试时,它变得更加成问题,因为我们正在重命名/删除 AddIn 实例 - 以至于在 Windows 7 上开发 VSTO 不再可行

请注意,加载项不在硬删除(禁用)列表中 - 它已被删除。我尝试安装/重新安装/卸载、重新启动、删除注册表项(清理缓存/卸载后)、从 C:\Documents and Settings\\Local Settings\Apps\2.0 删除文件系统文件、清除缓存(通过mage 和/或 rundll32 根据 Clear the .NET-downloaded application cache without Mage? )。 XP 和 Windows 7 之间的行为似乎存在明显差异。

有没有人遇到过类似的问题?

我能看到的唯一替代方案是具有完全成熟的 MSI 的部署项目,但是这远不及整洁 - 需要本地管理员访问权限等

非常感谢
特拉维斯

最佳答案

不确定您是否已阅读有关使用 Clickonce 发布 Office 解决方案的教程。如果你还没有,你可以通过下面的链接找到它们。值得阅读。

http://msdn.microsoft.com/en-us/library/vstudio/bb772100(v=vs.100).aspx

http://msdn.microsoft.com/en-us/library/vstudio/bb608591(v=vs.100).aspx

关于使用 windows 安装程序,这并不是很难做到,尤其是使用 Visual Studio 2010 安装项目。这是一个非常详细的教程,可以指导您完成所有这些。当我尝试部署 Excel 加载项时,它帮助了我很多,我希望它也能以某种方式帮助你。

http://msdn.microsoft.com/en-us/library/ff937654.aspx

此外,您可能想问自己这些问题,以确定使用 Clickonce/Windows 安装程序是否是正确的选择。

When it comes to your choice in deployment technologies, you don't need to limit yourself to just one option. The key is to choose the right tool for the right job. While there is no single rule or simple answer, there are some general guidelines you can use to help make the best decision for your specific needs.


  • 应用程序是否安装任何 COM 组件?
  • 应用程序是否需要为 COM-Interop 注册任何组件?
  • 应用程序是否安装任何服务?申请是否必须
    安装到特定位置或全局程序集缓存 (GAC)?
  • 应用程序是否有任何有条件的组件
    安装,基于操作系统还是运行环境?
  • 应用程序在安装时是否需要用户输入?
  • 应用程序是否需要配置系统级服务,例如
    事件目录或 COM+?
  • 安装应用程序后,它是否创建文件,写入
    注册表,或以某种方式影响系统,从而在删除应用程序时留下资源?

  • If you answered yes to any of these questions, then Windows Installer is the best choice for your needs. However, if you don't need to address the scenarios described in the list above, then ClickOnce is an excellent candidate for your deployment solution. If you want to leverage the distinct benefits provided by ClickOnce, then understanding the capabilities of ClickOnce early in your application design process is critical. Deploying an early version of an application with ClickOnce, but then belatedly realizing a need to move to Windows Installer, would create a difficult upgrade path that can be avoided through careful up-front planning.

    关于visual-studio-2010 - Windows 7 下的 ClickOnce/Excel-VSTO,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15601092/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com