如何重新添加已删除的VSTO加载项 [英] How to re-add a deleted VSTO Add-In

查看:592
本文介绍了如何重新添加已删除的VSTO加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一台机器上运行Word VSTO加载项时遇到一个奇怪的问题,运行Visual Studio项目会打开word,但据我所知,并没有尝试启动加载项.

I've got a strange issue with a Word VSTO add-in on one machine where running the visual studio project opens word but does not attempt to start the add in as far as I can tell.

之所以到达这一点,是因为我不小心在管理COM加载项"页面上为加载项"单击了删除",而不是在失败后重新启用它.

I got to this point because I accidentally clicked Remove for the Add-in on the Manage COM Add-ins page, instead of re-enabling it after a failure.

我想知道如何重新启用已删除的加载项-我在想也许某个需要删除的注册表项.

I want to know how to re-enable a deleted add-in - I'm thinking that perhaps there is a registry key somewhere I need to get rid of.

  • 当我从Visual Studio运行项目时,它不会尝试 完全启动,Word立即启动,没有任何失败的东西" 键入暂停.
  • 在ThisAddIn_Startup中没有断点被击中.
  • 在Word中:文件/选项/加载项-加载项不会出现在非活动或禁用的加载项"下
  • Word:管理COM加载项Go ...它不出现.
  • 字词:管理禁用的项目进入..."为空.
  • When I run the project from Visual Studio it does not attempt to start up at all, Word starts instantly with no "something-is-failing" type pause.
  • No breakpoints in ThisAddIn_Startup are hit.
  • In Word : File/Options/Add-ins - the add-in does not appear under Inactive or Disabled Addins
  • Word : Manage COM Add-ins Go... it does not appear.
  • Word : Manage Disabled Items Go... is empty.

我已经尝试安装和卸载已发布的版本,以查看是否能唤醒所有内容,并且我尝试更改VS项目的路径,以防万一有所作为(以及各种重新启动,清理,重建) ,从git本地删除并重新克隆等),但我找不到使它重新工作的方法.在另一台机器上,从Git克隆加载项,然后在Visual Studio中打开它,一切正常.

I've tried installing and uninstalling the published version, to see if that wakes anything up, and I've tried changing the path of the VS project, just in case that makes a difference (and various restarts, cleans, rebuilds, locally deleting and re-cloning from git etc) but I can't find a way to get this to work again. On a different machine, cloning the add-in from Git and opening it in Visual Studio and its all fine.

我尝试通过COM加载项上的select DLL(或选择.)对话框重新添加,但是我选择的任何内容似乎都不是有效的加载项.

I've tried re-adding via the select DLL (or select .) dialog on the COM Add-ins but nothing I select appears to be a valid add-in.

任何帮助我们弄清楚如何回到工作中的开发环境的人,将不胜感激.

Any help to figure out how to get back to a working development environment would be appreciated.

编辑 下面发生了很多事情-所以我想澄清一下,成功的解决方案是Office的在线修复

EDIT There's a lot going on below - so I thought I'd clarify that the successful solution was the online-repair of Office

推荐答案

注册表中的LoadBehaviour是什么?应该是3 ...

What is the LoadBehaviour in the registry? It should be 3...

要查找,请查看

  • 32位Word => Root \ Software \ Microsoft \ Office \ Word \ Addins \ add-in ID
  • 64位Word => Root \ Software \ Wow6432Node \ Microsoft \ Office \ Word \ Addins \ add-in ID

根目录是 HKEY_CURRENT_USER HKEY_LOCAL_MACHINE ,具体取决于是为当前用户还是为每个用户安装了该插件.

where Root is HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE, depending on whether the addin is installed for current user or everyone.

如果LoadBehaviour的值不是3,则将其更改为3并重新启动Word.

If the value for LoadBehaviour is not 3, then change it to 3 and restart Word.

这是关于它的Microsoft文档:

Here is the Microsoft docs about it: Registry entries for VSTO Add-ins

如果仍然无法正常运行,请尝试重新启用,因为可能已硬禁用:

If it still does not work, try to re-enable as it might be hard disabled:

  • 在"管理"框中,将" COM加载项"更改为"禁用的加载项",然后单击"执行".
  • 选择加载项,然后单击启用.点击关闭.现在可以再次加载该加载项...
  • 返回 Manage 框中,将 Disabled Add-ins 更改为 COM Add-ins ,然后单击 Go .
  • 选中禁用的加载项旁边的复选框.点击确定.
  • In the Manage box, change COM Add-ins to Disabled Add-ins, and click Go.
  • Select the add-in and click Enable. Click Close. Now the add-in can be loaded again...
  • Back in the Manage box, change Disabled Add-ins to COM Add-ins, and then click Go.
  • Check the checkbox next to the disabled add-in. Click OK.

这是关于它的Microsoft文档:

Here is the Microsoft docs about it: How to: Re-enable a VSTO Add-in that has been disabled

此外,如果您尚未执行此操作,则值得将此页面上的VSTO_SUPPRESSDISPLAYALERTS设置为0:

Also, if you haven't done this already, it is worth setting VSTO_SUPPRESSDISPLAYALERTS to 0 as described on this page: How do I enable VSTO error / display alerts?

如果上述方法均无济于事,则值得通过添加或删除程序 Office 进行在线修复.

If none of the above helps, then it is worth doing a Online repair of Office from Add or Remove Programs.

这篇关于如何重新添加已删除的VSTO加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆