卸载MS Word加载项 [英] Uninstall MS Word Add-in

查看:130
本文介绍了卸载MS Word加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习如何为Microsoft Office Word创建加载项.我已经在Visual Studio 2010中创建了一个简单的Word 2010加载项项目,该项目在消息框中显示"Hello World".到目前为止,一切正常.但是,如果要将消息从"Hello World"更改为"Hi",则会收到以下错误消息

I'm in the process of learning how to create add-ins for Microsoft Office Word. I've created a simple Word 2010 Add-In project in Visual Studio 2010 which displays "Hello World" in a message box. Up to this point everything works fine. But if I want to change the message for instance from "Hello World" to "Hi" i get the following error message

System.Deployment.Application.DeploymentException:无法安装此应用程序,因为已经安装了具有相同标识的应用程序.要安装此应用程序,请修改此应用程序的清单版本或卸载先前存在的应用程序.

System.Deployment.Application.DeploymentException: Unable to install this application because an application with the same identity is already installed. To install this application, either modify the manifest version for this application or uninstall the preexisting application.

安装外接程序后,请执行以下操作:

After installing the add-in I do the following:

  1. 从Ms Word选项中删除加载项,加载项
  2. 从添加删除程序"中卸载加载项
  3. 删除Normal.dot文件
  4. 在项目的bin/Debug文件夹中删除.vsto

重新运行项目后,我得到了上面的错误. 我真的不知道这个插件还有什么其他地方,因为我认为我删除了所有可能找到它的引用的地方.

Once I re-run the project I get the error above. I really don't know where else can this plug in exist as I think I delete all possible places where any references to it could be found.

我也尝试过运行RegScanner并删除与该加载项有关的所有注册表项,但是却遇到了相同的错误...

I've also tried running RegScanner and deleting all the registry entries pertaining to the add in,yet im getting the same error...

如果以前有人遇到过此问题,并且您确切知道如何解决该问题以及可能导致该问题的原因,请告诉我!

If anyone had this issue before and you know exactly how to solve it and what could be causing it please let me know!

推荐答案

我发现,如果您在Visual Studio的MS Word加载项中修改任何代码,并且希望在MS Word中更新所做的更改,则可以跟随:

I discovered that if you modify any code in a MS Word Add-in in Visual Studio and you want your changes to be updated in MS Word you can do the folowing:

在Visual Studio中,在项目名称\属性\发布\发布属性"中更改版本号.

In Visual Studio,change the version number in Project Name\Properties\Publish\Publish Properties.

版本号更改后(例如1 0 0 1 ),将在Visual Studio中重建项目.

Once the version number has been changed (e.g 1 0 0 1) rebuild the project in Visual Studio.

导航到ProjectFolder \ bin \ Debug并双击.vsto文件,瞧!您会收到以下消息- Microsoft Office自定义已成功更新.如果您使用文本编辑器查看.vsto文件,您还可以看到版本号已更改为新值,因此双击.vsto文件,将发生更新.它将获取一个新的版本号,然后重新安装该加载项并成功附加到Word.

Navigate to ProjectFolder\bin\Debug and double click the .vsto file, voila! You get the following message - The Microsoft Office customization was successfully updated.If you view the .vsto file with a text editor you can also see that the version number has been changed to a new value,hence an update occurs when you double click the .vsto file.It picks up a new version number and re-installs the add-in and successfully attaches to Word.

如果上述方法是可以接受的,那很好,但是我仍然想知道是否有任何方法可以在Word中自动更新加载项而无需更改版本号.只需更改代码,重建项目,安装.

If the above is the accepted way to do it, that's fine, but I would still like to know whether there is any way that an add-in can be automatically updated in Word without changing the version number.Simply change code,rebuild project,install.

这篇关于卸载MS Word加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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