简体   繁体   English

C#ClickOnce应用程序不会更新

[英]C# ClickOnce application doesn't update

I have a C# application which I want to publish to an FTP site, and it will automatically update my application from this FTP location. 我有一个C#应用程序,我想发布到FTP站点,它将自动从这个FTP位置更新我的应用程序。 So I run the publish wizard: 所以我运行发布向导:

  1. Specify the location to publish this application: 指定发布此应用程序的位置:

     ftp://45.webmasters.com/program/ 
  2. How will users install the application: From a CD or DVD-ROM (Not Website nor a UNC path accept the FTP) 用户将如何安装应用程序:从CD或DVD-ROM(非网站或UNC路径接受FTP)
  3. Where should the application check for updates? 应用程序应该在哪里检查更新? The application will check for updates from the following locations: I want to update from the FTP site like: ftp://45.webmasters.com/program/ , but this option is only to update the application from a Web site (HTTP). 应用程序将检查以下位置的更新我想从FTP站点更新,如: ftp//45.webmasters.com/program/ ,但此选项仅用于从网站(HTTP)更新应用程序。

I abandoned the publish wizard and try to publish from the properties. 我放弃了发布向导并尝试从属性发布。 In Solution Explorer, right-click on the project and click properties and go to Publish tab. 在解决方案资源管理器中,右键单击项目并单击属性,然后转到“发布”选项卡。

  1. Publish folder: ftp://45.webmasters.com/program/ 发布文件夹: ftp//45.webmasters.com/program/
  2. Installation folder URL (IF DIFFERENT THAN ABOVE). 安装文件夹URL(如果与上述不同)。 So this should be blank since I want to install this from the FTP site. 所以这应该是空白的,因为我想从FTP站点安装它。 I leave it blank, NO it says it wants to give it an HTTP location. 我把它留空,不,它说它想给它一个HTTP位置。 Even that gives you the option to specify an FTP site; 即便如此,您也可以选择指定FTP站点; it wants a URL. 它想要一个URL。 Anyway, let's say I add there http: localhost/ just to bypass this box. 无论如何,让我说我添加http:localhost /只是为了绕过这个盒子。 I choose the application is online and offline in order to enable the updates button. 我选择在线和离线应用程序以启用更新按钮。 I press the UPDATES button. 我按下UPDATES按钮。
  3. The application should check for updates is checked. 应用程序应检查更新是否已检查。
  4. When to check for updates, the radio button before the application starts is selected. 何时检查更新,选择应用程序启动前的单选按钮。
  5. Specify a minimum required version is not checked. 未选中指定最低要求版本。
  6. Update location (if different than publish location). 更新位置(如果与发布位置不同)。 So I leave it blank in order to check for updates from the publish location. 所以我将其留空以便检查发布位置的更新。

And finally I press PUBLISH NOW and the application is published on the FTP site. 最后我按下PUBLISH,应用程序在FTP站点上发布。 I go to the FTP site, and I download the application and the application files and I run the application from my desktop and it checks for updates before the application starts, but when I publish newer versions on the FTP site and I run the application shouldn't it download the newer version? 我去了FTP站点,我下载了应用程序和应用程序文件,我从桌面运行应用程序,它在应用程序启动之前检查更新,但是当我在FTP站点上发布更新版本并运行应用程序时它下载新版本? It doesn't; 它没有; it sticks with the old version. 它坚持旧版本。

I cannot understand these options.. Is it possible that is not allowed to publish and update from an FTP location? 我无法理解这些选项..是否有可能不允许从FTP位置发布和更新?

It says it in How to: Publish a ClickOnce Application using the Publish Wizard that Direct download from FTP is not supported. 它在“ 如何:使用发布向导发布ClickOnce应用程序”中说明不支持从FTP直接下载。 when you publish to 'publish to a file share' - maybe you should choose 'publish to a web' path. 当您发布到“发布到文件共享”时 - 也许您应该选择“发布到网络”路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM