VSTO的Excel加载项的ClickOnce自动更新错误 [英] ClickOnce Automatic Update error for VSTO- add-in for Excel

查看:104
本文介绍了VSTO的Excel加载项的ClickOnce自动更新错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的测试程序,以尝试了解Click-Once部署的工作原理以及是否可以自动更新该程序。

I created a simple test program to try and understand how Click-Once deployment works and whether or not I can have the program automatically updated.

这是一个很好的选择加载项,在功能区中带有一个按钮,可输出一些消息框。我将部署位置设置为网络上的公共位置,并将更新设置为每次运行自定义项时都要进行检查。太好了-我安装了外接程序,打开Excel,它工作正常。现在,我进入Visual Studio,更新并重新发布该加载项。现在,当我打开Excel时,我收到一条错误消息,提示已安装了该应用程序的较早版本,无法安装新版本。

It is an excel add-in with a button in the ribbon that outputs some message box. I have the deployment location set to a public location on the network and updates set to check every time the customization runs. Great - I install the add-in, open Excel, it works fine. Now I go into visual studio and update and re-publish the add-in. Now when I open Excel I get an error that says an earlier version of this application is installed and cannot install the new one.

我需要做些什么才能得到这个工作?我在属性中看到可以有一个Pre-build事件命令行...所以我假设也许我需要某种命令行功能才能在安装新版本之前卸载旧版本?

What do I need to do in order to get this to work? I see in the properties I can have a Pre-build event command line... so I am assuming maybe I need some sort of command line function to uninstall the old version before installing the new one? Not really sure how to go about doing this.

推荐答案

此错误是由于在开发和测试中使用同一台计算机所致。
要测试更新行为,请执行以下步骤:

This error is due to using the same computer in development and test. To test the update behaviour, here are the steps :


  • 将更新参数设置为程序每次启动

  • 发布V1.0.1,然后将文件移至您的网络服务器或其他

  • 发布v1.0.2,并暂时将文件分开保存

  • 使用Visual Studio清洁解决方案

  • 从服务器安装v1.0.1

  • 将v1.0.2移至服务器( vsto +应用程序文件)

  • 再次运行您的解决方案,然后查看更新过程:)

  • set the update parameter to "each time the program launch"
  • publish V1.0.1, and move the files to your webserver or other
  • publish v1.0.2, and save the files apart for the moment
  • Clean solution using Visual Studio
  • install v1.0.1 from your server
  • Move v1.0.2 to server (vsto + application files)
  • Run again your solution and see the update process going through :)

这篇关于VSTO的Excel加载项的ClickOnce自动更新错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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